question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding WebMarkupMin with a ServiceStack .Net Core enabled project fails

See original GitHub issue

When adding WebMarkupMin to my project, I get a

NotSupportedException: Stream does not support writing.

System.NotSupportedException: Stream does not support writing.
   at System.IO.MemoryStream.SetLength(Int64 value)
   at WebMarkupMin.AspNetCore1.WebMarkupMinMiddleware.<Invoke>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__6.MoveNext()

image

The configure method:

    // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
    {
      loggerFactory.AddConsole(Configuration.GetSection("Logging"));
      loggerFactory.AddDebug();
      if (env.IsDevelopment())
      {
        app.UseDeveloperExceptionPage();
      }
      else
      {
        app.UseExceptionHandler("/Home/Error");
      }

      app.UseStaticFiles();

      app.UseWebMarkupMin();

      app.UseServiceStack(new AppHost());

      app.UseMvc(routes =>
      {
        routes.MapRoute(
                  name: "default",
                  template: "{controller=Home}/{action=Index}/{id?}");
      });

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Taritsyncommented, Nov 11, 2016

In WebMarkupMin 2.2.2 fixed this error.

@RobSchoenaker Thanks for demonstration project.

@mythz I have tried to prevent such compatibility errors in the future.

1reaction
mythzcommented, Nov 11, 2016

To save anyone spending any more time on this issue, this is now resolved in ServiceStack .Core NuGet packages from v1.0.28, more details at: https://forums.servicestack.net/t/net-core-razorformat-omission/3165/9?u=mythz

@Taritsyn BTW cool library, looking forward to using it future 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebMarkupMin/CHANGELOG.md at master
Fixed a error #20 “Adding WebMarkupMin with a ServiceStack .Net Core enabled project fails”; Added the ability to specify a level of GZip...
Read more >
Endpoint for ASP.NET Core Health check does not work
I have create a new Razor project for Asp.net core 3.1 using the x-command: x new razor RazorTest Next, I want to add...
Read more >
.NET Core Overview
NET Core, where it's all maintained within a single code-base enabling excellent source-code compatibility to maximize existing knowledge and code-reuse and ...
Read more >
How to fix ServiceStack incompatibility with .NETCoreApp ...
I tried to add ServiceStack to my ASP.NET MVC Web App project, by going in Project > Add NuGet Packages and installing de...
Read more >
Web Markup Minifier changelog - Awesome .NET - LibHunt
Fixed a error #20 “Adding WebMarkupMin with a ServiceStack .Net Core enabled project fails”; Added the ability to specify a level of GZip...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found