Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding WebMarkupMin with a ServiceStack .Net Core enabled project fails #20

Closed
RobSchoenaker opened this issue Nov 10, 2016 · 6 comments

Comments

@RobSchoenaker
Copy link

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?}");
      });
@Taritsyn
Copy link
Owner

Hello, Rob!

You could make a demonstration project, which reproduce this error.

@RobSchoenaker
Copy link
Author

Will do. I will drop the link here

@Taritsyn
Copy link
Owner

OK

@RobSchoenaker
Copy link
Author

Here you are:

https://github.com/RobSchoenaker/WMWSS

@mythz
Copy link

mythz commented 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 :)

Taritsyn added a commit that referenced this issue Nov 11, 2016
@Taritsyn
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants