Page uses invalid or unsupported form of compression when debugging an ASP.NET MVC application with Visual Studio 2013 preview

When I try to debug an ASP.NET MVC project using the recently released VS 2013 Preview, I get this message:

Content Encoding Error

The page you are trying to view cannot be displayed because it uses an invalid or unsupported form of compression.

Please contact website owners to let them know about this issue.

In Firebug I see this error message:

 SecurityError: The operation is insecure 

Tried Google Chrome and IE 11, and this problem occurs.

What causes this?

Note. I am running on Windows 8.1 and debugging the site using IIS Express at http://localhost:7777

I can debug it just fine using VS 2012.

+8
visual-studio-2013 asp.net-mvc iis-express visual-studio-debugging
source share
2 answers

Well ... after trying some options, I turned off Browser Link in the VS 2013 toolbar and only the login page appeared.

enter image description here

It seems like they need to work a little bit on this, because in my case it did not work.


After debugging a problem with Microsoft developers, Mads Kristensen (PM on ASP.NET) got into the core of the problem that was in my Web.config file.

Inside the <system.webServer> element, I have:

 <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" /> 

That dynamicCompressionBeforeCache="true" interferes with HttpModules (this is what Browser Link uses). Setting it to false allows you to use the browser link in the preview of Visual Studio 2013.


References

Browser Link is used to connect Visual Studio directly to browsers.

Browser Link - SignalR channel between browser and Visual Studio

Browser Link Function in Visual Studio Preview 2013

+20
source share

For me - this problem was related to compression settings related to web.config. I had this in my web.config:

 <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="14.00:00:00" /> </staticContent--> 

It is assumed that it caches static content, but apparently distorted my css files and the browser could not view them. I just deleted this line and it worked again.

+1
source share

All Articles