Comments (4)
Hello, Bruno!
Today I fixed another small defect and released version 2.13.4.
… Now we are getting some blank screens. …
…
This problem started when we upgraded from net6.0 to net7.0.
Prior to version 2.13.0, as a rule, such errors occurred for 2 reasons: due to outdated implementation of the BodyWrapperStreamBase
class and peculiarities of disposing an empty instance of the BrotliStream
class. Now, in most cases, such errors no longer occur (“[WebMarkupMin.AspNetCore5] Sometimes a blank page is returned as the request has no response data available” and “Blank page response”). It is quite possible that you are using an extension focused on old version of ASP.NET Core and you should replace it by the WebMarkupMin.AspNetCore7 package.
… Some Views work fine and others don't.
It is possible that some Views contain HTML code with syntax errors. Therefore, I recommend you to write your own logger or use the built-in logger (ThrowExceptionLogger
class). In your case, the logger for WebMarkupMin needs to be registered in the Program.cs
file as follows:
…
using IWmmLogger = WebMarkupMin.Core.Loggers.ILogger;
using WmmThrowExceptionLogger = WebMarkupMin.Core.Loggers.ThrowExceptionLogger;
…
var builder = WebApplication.CreateBuilder(args);
…
// Override the default logger for WebMarkupMin.
builder.Services.AddSingleton<IWmmLogger, WmmThrowExceptionLogger>();
…
from webmarkupmin.
We are facing the same problem.
from webmarkupmin.
Hello!
Thanks for information! Try updating to version 2.13.3.
from webmarkupmin.
Hi @Taritsyn thx for your efforts and support.
I've updated to latest version and the error changed. Now we are getting some blank screens. I've no clue which info to send you. Some Views work fine and others don't.
I see some changes in code to prevent the _compressionStream
from null at BodyWrapperStreamBase, This was the problematic line.
This problem started when we upgraded from net6.0 to net7.0.
But there is an workaround:
Our code
builder.Services
.AddWebMarkupMin(options =>
{
options.AllowMinificationInDevelopmentEnvironment = true;
options.AllowCompressionInDevelopmentEnvironment = true;
})
.AddHtmlMinification()
.AddXmlMinification()
.AddHttpCompression(options => { options.ExcludedPages = new List<IUrlMatcher> { new WildcardUrlMatcher("/health*") }; });
If I change to this:
builder.Services
.AddWebMarkupMin(options =>
{
options.AllowMinificationInDevelopmentEnvironment = true;
options.AllowCompressionInDevelopmentEnvironment = true;
})
.AddHtmlMinification(options =>
{
HtmlMinificationSettings settings = options.MinificationSettings;
settings.RemoveRedundantAttributes = true;
settings.RemoveHttpProtocolFromAttributes = true;
settings.RemoveHttpsProtocolFromAttributes = true;
options.CssMinifierFactory = new NUglifyCssMinifierFactory();
options.JsMinifierFactory = new NUglifyJsMinifierFactory();
})
.AddXmlMinification()
.AddHttpCompression(options => { options.ExcludedPages = new List<IUrlMatcher> { new WildcardUrlMatcher("/health*") }; });
It start to work again.
from webmarkupmin.
Related Issues (20)
- problem dont use Quotes in Html Attribute HOT 2
- [WebMarkupMin.AspNetCore5] Sometimes a blank page is returned as the request has no response data available HOT 30
- Minified attributes seem to be double encoded HOT 4
- More a question, not an "issue" HOT 9
- .NET 7 broke BrotliCompressor due to invalid compression levels HOT 4
- Hmmm… can't reach this page It looks like the webpage HOT 1
- object ref error with WebMarkupMin.AspNetCore7. HOT 3
- Whitespace trimming on anchor tags (when using svg tag) HOT 28
- Minification Failing - GTM no script tags breaking minification HOT 5
- The minifier does not compress the content if there is code in the html HOT 2
- DotNet 8 support HOT 3
- <button> type attribute with "submit" value is removed HOT 1
- Previously worked HOT 11
- XML minification HOT 6
- Question regarding asp.net webforms > .ascx HOT 9
- Unclosed td / th tags on PartialView HOT 2
- Invalid HTML Minification Result HOT 2
- .NET 6 -> .NET 8 (Markup minification not working) HOT 1
- Encoding in HtmlAttributeValueHelpers breaks Third Party JS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webmarkupmin.