httpCompression missing from IIS configuration editor section for SITE - asp.net

I'm attempting to enable gzip compression on my web server. I've installed the dynamic compression module on the server and enabled it in IIS. Now I'm attempting to specify dynamicTypes to include application/json. I followed these steps. I successfully added the dynamics types at the server level. When I checked my app, I noticed the response headers still did not include gzip. I then went back into IIS to confirm the configuration editor settings at the server were inherited for my site. At the site level, I do no see an httpCompression node in the drop down under the system.webServer section. A colleague with IIS10 (I have IIS8) is able to see the system.webServer/httpCompression node.
Any idea why I'm not seeing that node? I believe this is responsible for gzip not working in my setup.

That's strange you don't see it. Try reinstalling compression modules(dynamic and static). Apart from that make sure you have below under your system.webServer
<urlCompression doDynamicCompression="true" doStaticCompression="true" />

I just figured out what the problem was. First, there seems to be a difference between versions of IIS (IIS6 and IIS10 in my case) in that some (newer) versions have an system.webServer/httpCompression on the site, not just the server. I thought that was the reason dynamic caching seemed to not work on our dev server but did work on a colleague's machine with IIS10.
It turns out the reason I wasn't seeing a gzip encoding reference in the response headers is because of IE, IE10 to be exact. Our dev environment currently has a certificate problem and you can only open the app in IE. I have IE10 and it does not appear to display any information on the response headers about compressed encoding. I had my colleague with IE11 hit our app in the dev environment and he sees the gzip encoding reference in the response headers.
This is why I hate IE...

Related

Blank ASP.NET Webpage for the application deployed on IIS

I have an asp.net application deployed on IIS Server located at 10.0.0.74, when
i tried to access it with chrome browser i get an empty or blank webpage.
However if my colleague tries to access it from his computer he get normal webpage with content on it.
It seems really weird to me what might be the problem.
The screen shot below is what the page looks like.
I would appreciate any help
This is not enough to go on, assuming ASP MVC 5 on IIS here are some suggestions.
On your server
Check the following
Is the physical path in IIS correct - actually point to your code?
Do you have any rewrite rules in your web.config that could be redirecting?
Did you set up the bindings correctly?
Are you hitting the site under https / http?
Checked "Turn windows features on/off" and see if ASP.NET 4.8 installed
Did you setup the HTTP Redirection and HTTP Errors
See how you are setting up error handling setup in your global.asax, see here and disable it
Goto your Control panel > Programs and features > Turn Windows features on or off and under "World Wide Web Services" / components:
Common HTTP features:
Default document
Directory browsing
HTTP Errors
HTTP Redirection
Static Content
Security
Basic authentication
Request filtering
URL Authorization
Windows authentication
The problem was that the plugins in "Content" folder were not included in the projects.
I included all the files shown in the image below.
I apologize for wasting your time, i should have checked the console before!

IIS 8.5 Serving Old Files

I have a clickonce application on Windows Server 2012 IIS 8.5. I recently updated it to a new version and it works fine, except for one url used by a second web page to link to it. It links directly to the .application file and when I use that link I get version 2.1.0.10 of that file instead of the one that is one the server version 3.1.0.1.
It's only when using the that link, other url's server the correct file. I've even stopped the website on both servers (load balanced) and the link still somehow downloads the old file.
I have cache and kernel cache turned off under Output Cache Settings in IIS, I have Common HTTP Response Headers set to Expire Web Content immediately, but it's still serving up and old file even though it doesn't exist anymore. I have a url rewrite rule for that specific url to redirect to one that works and still I download an old file.
I've restarted IIS and the servers themselves and nothing has changed. I then tried copying the files to a new folder and creating a new site in IIS. I copied over the bindings and stopped the old site and app pool. Still get served the old file.
Can anyone help me figure out what's going on with the IIS? How is it serving up a file that doesn't exist, even when the website is stopped? How can I get it to update?
I had the same issue and tried everything mentioned here (and elsewhere!), and finally found out that the reason was the IIS Compression cache!
On the IIS console, click on the website and then on the Compression, and uncheck the Enable static content compression.
This should solve the problem.
If the web server has been stopped, it is possible that this file may be 'served' from your browser's cache.
Have you tried clearing your browser's cache? If this doesn't work, it might be worth restarting the IIS service completely, or, failing that, moving the website's wwwroot directory elsewhere, and redeploying the latest version of your site, or simply renaming the .application file and re-deploying?
This would be akin to cleaning and re-building a project in Visual Studio.
This was eventually found to be caused by a setting on the load balancer caching results. We turned off this setting and now no longer have the issue.

Site functions locally, "Internet Explorer cannot display the webpage" on server

I have an ASP.Net Website (not a web app, fwiw) that builds and works just fine locally through IIS on my dev laptop.
However, when I publish it to our QA box and try to view while I'm remoting into that server, I get a message from IE saying "Internet Explorer cannot display the webpage". Firefox just spits back a quick "Connection Timed Out"
There is absolutely nothing in the event log nor the IIS log about this. I'm unsure where I can look for more info.
I'm fairly confident it is an ASP.Net issue. I can install a sample site from our vendor, Ektron, into IIS and it will run. If I overwrite the sample's web.config with my own, it continues to run. If I then blow away the entire sample site and copy over my site from my local, I'll get the message about how "Internet Explorer cannot display the webpage".
I've tried to keep the environments as close together as I can. Both boxes are running IIS 7.5 under an integrated app pool for .Net 4.0. I browse via localhost on dev and via an IP on the server.
I am not terribly familiar with the Website template, so I might be missing something obvious (I hope!). I'm hoping someone can provide some guidance into how I can get more info on what the heck is going on so I can resolve this issue.
UPDATE
I think I'm getting closer. By using Fiddler (thanks for the suggestion, Amy!) I notice that it redirects the request to SSL. SSL requires a different license from our vendor, so that might be it. I'm still trying to understand why that redirect is taking place, but at least I have something now to look at.
I'd look into the SSL settings in the web.config / IIS - settings for Mime Types and also into Ektron's MIME Types in the MimeType.config file. I found that some .aspx pages like (ekajaxtransform.aspx) weren't functioning correctly because of firewall/proxy issues/restrictions.
Hope it helps. :)

Website on IIS different than on Apache

I developed a website and published it on a LAN computer running IIS 6.0 all through my testing phase to make sure it looked correct and worked with all browsers. I heavily used CSS for my layout, a small amount of javascript and ASP only for Server Side Includes. The layout was tested in Chrome, Firefox, Opera, IE8 and Safari. All working as intended.
When I went to upload my completed website onto my domains host, the website came out looking completely different as well as the css drop-down menu not working. The following URL shows the differences (sorry both screen caps are combined because of link limit on SO):
Pic
After investigating a little bit, I discovered that hosting site runs Apache as their server. I also ran the ASP command Request.ServerVariables("SERVER_PROTOCOL") on both hosts and discovered that my IIS testing host returned SERVER_PROTOCOL: HTTP/1.1 while the Apache host returns SERVER_PROTOCOL: HTTP/1.0
I am somewhat stuck on where to go from here. Is this difference in server protocols causing my css to be interpreted incorrectly on the Apache server? Can I do anything about it considering my domain hosted server is out of my control? Am I completely off track and should look elsewhere?
CSS is interpreted by the browser, not the web server. The problem probably has to do with the way your hosting provider supports ASP sites (if it supports that at all).
This smells like wrong file references.
Are you sure the live server is not just getting a fatal error and aborting the execution of the page?
Have you checked your error log in your host control panel?
there could be some \ (backslash) instead of / (slash) in some path definition. IIS interprets backslash or slash in the same way (Apache doesn't).

Gzip ASP.NET in debug mode

I've tried to setup compression (both dynamic and static) in IIS7 for my local system, but when start my ASP.NET site using the debugger, YSlow tells me that all of the files (aspx, js, css, etc.) are not compressed. Any ideas? I really want to test this before I make changes to the production server.
Are you using Cassini as your server? If so it does not support compression that I know of.
You might try using Fiddler to see what the accept headers are that are being sent back and forth:
Fiddler
Enable compression on dynamic content in IIS7
Problem with GZIP transfer using webrequest

Resources