Adding WebMarkupMin with a ServiceStack .Net Core enabled project fails
See original GitHub issueWhen 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()
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:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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 😃