Where are IIS error pages stored? - iis-7

I have a webhosting company. When a client does not I stop their sites app_pool
and in the web.config I add:
<httpRedirect enabled="true" destination="http://account.SimpleTix.com/Suspended/" exactDestination="false" httpResponseStatus="Found">
<clear />
</httpRedirect>
However, since the app_pool is turned off the redirect does not happen and the 503 error appears.
If I turn the app_pool on, the nice redirect happens.
I'd rather not have extra app_pools running though.
Is there a way to set the error 503 html code? I could just add a basic http refresh meta tag.
example...
http://wongfurockauditorium.simpletix.com/

There are some you cannot customize, which are mentioned in this article,
http://technet.microsoft.com/en-us/library/cc753103(v=ws.10).aspx
You cannot customize the following HTTP errors: 400, 403.9, 411, 414,
500, 500.11, 500.14, 500.15, 501, 503, and 505.

Related

Why do I get error 403 while trying to access apple-touch-icon.png over HTTPS but test in browser gives 200?

I have an apple-touch-icon.png in the root of my website in IIS 8.5, this is in the header:
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
In the web.config I give read access to this file:
<add name="AppleTouch" path="apple-touch-icon.png" verb="*" type="System.Web.StaticFileHandler" resourceType="File" requireAccess="Read" preCondition="integratedMode" />
When I test this in all browsers the icon shows up, but when I try to bookmark on an iPad I get the 403 error without a substatus.
Even when I check the favicons on https://realfavicongenerator.net/favicon_checker they work.
UPDATE1: using the "Failed Request Tracing Rules" in IIS I managed to get more info on the error. it shows this warning:
MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName
IsapiFilterModule
Notification
AUTHENTICATE_REQUEST
HttpStatus 403
HttpReason
Forbidden
HttpSubStatus 0
UPDATE2: thanks to more debugging of the IsapiFilterModule I found an issue with the .htaccess file. The apple-touch-icon.png was blocked by HackRepair.com Blacklist 2018 where CFNnetwork was blocked. Removing the RewriteCond for this HTTP_USER_AGENT gave no more 403 errors! The apple-touch-icon now works on iPhone, but not on iPad.
As far as I know, the 403.0 means user doesn't have the permission to access the file.I suggest you could follow below steps to modify the file's perission.
1,Right click the png file and click the property.
2.Click security and add iusr in the permission tab
3.Modify the IUSR permission to allow read and write.

Why does my ASP.NET webpage throw custom 404 error with certain file extensions

So, I have a folder on my server such like this:
You can access this resources by the URL:
Image:
Text:
But the kmz, instead of opening the file (maybe like the text in the xml, I'm not expecting to visualize it) it returns a strange 404:
Is there any way of allowing all files to be accessed without an error?
Thank you very much.
As far as I know, if you wants to access the kmz file in the browser, you will face 404.3 error.
Error details:
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
To solve this issue, you should add the MIME map for kmz file.
I suggest you could add below config file into the web.confil, then it will work well.
<system.webServer>
<staticContent>
<remove fileExtension=".kml" />
<mimeMap fileExtension=".kml" mimeType="application/vnd.google-earth.kml+xml" />
<remove fileExtension=".kmz" />
<mimeMap fileExtension=".kmz" mimeType="application/vnd.google-earth.kmz" />
</staticContent>
</system.webServer>

Why is gzip compression not working on IIS 8.5?

I am unable to get gzip compression working on IIS 8.5 on a Server 2012 R2 machine. I have done some research and followed the instructions found in these posts:
How to enable GZIP compression in IIS 7.5
Compression in IIS 8.5 not successful, stating ALREADY_CONTENT_ENCODING
GZip Compression On IIS 7.5 is not working
gzip compression not working with IIS 8.5
Here is the relevant section of my config:
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" staticCompressionIgnoreHitFrequency="true">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<!-- I have read that dynamic compression increases server CPU load.
<dynamicTypes>
<add mimeType="text/*" enabled="true"/>
<add mimeType="message/*" enabled="true"/>
<add mimeType="application/javascript" enabled="true"/>
<add mimeType="*/*" enabled="false"/>
</dynamicTypes>
-->
<staticTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/javascript" enabled="true" />
<add mimeType="*/*" enabled="false" />
</staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
Also, in IIS, I set compression to apply to anything larger than 256 bytes. And I have performed iisreset.
Nonetheless, I don't see the compression mentioned in my dev console in Chrome or IE and PageSpeed still tells me to compress stuff. What simple step have I missed?
It will be difficult to understand what is happening.Assuming that you have done all the IIS settings correct.
For checking if compression is working fine or not,How are you accessing the website. e.g. If you use an FQDN www.example.com ,please try and use localhost url. This will make sure your IIS settings are correct.
If localhost works fine and your Fully Qualified domain name does not work,then problem can be in the network.In order for compression to work,the browser needs to send request header accept-encoding:gzip, deflate . many at times your proxy or load balancer can trim this header and this header may not reach the IIS server.So IIS will never compresseven if all the settings are done right.
To verify what is happening for the request and why IIS did not compress the request,you can do the following.
make sure you have Failed Request tracing installed.
Configure your Failed Request Definition
Go to Failed Request tracing Modules
Click Add on the sidebar
Enable All Content and status as 200-999
And Finish the configuration.
Now reproduce the issue and you will get a traces captured in directory C:\inetpub\logs\FailedReqLogFiles\W3SVC .
Open the trace file(for each requests one file will be generated.Open the trace file in IE(make sure the request details matches the request you would like to verify) and go to the compact view
Search for Compression and also check the reason
As mentioned in answers to one of the questions the OP links to, be sure to check for any anti-virus software running on the server. In my case it was ESET. None of the IIS compression settings had an effect until the relevant ESET settings were disabled.
I'm leaving out details of the settings- I did what seemed like a pretty blanket disable and left it to IT to figure out which exact setting was most appropriate for compression to still work while retaining security.
I had a similar issue and was caused by ESET with some strange behavior.
It worked on some machines but not on the one with eset, it took me some time to realize.
What happened is that ESET caused chrome to downgrade http2 requests to http 1.1 and not compress them. It can be seen if you open network and enable 'protocol' column. After removing eset it worked even if I forced chrome to use http1.1 with '--disable-http2' flag
Anyway if it still not working I would try to (in addition to the other answers):
check if different clients behave the same (in my case only dev machine had the issue)
deploy a simple static site (event default one) and test
reinstall iis
check settings on iss server manager, configuration editor / system.webServer/httpCompression collection, change compression level

Redirect web.config IIS 8

I tried to make a redirect in web.config, but I get a 500 error. The version of IIS is 8.5, but before I was on version 6. What is wrong with this syntax ?
<location path="Test/test.aspx">
<system.webServer>
<httpRedirect enabled="true" destination="http://domain/Test/IT/test.aspx" httpResponseStatus="Permanent" />
</system.webServer>
</location>
I get an this error message : Internal error - 500. I deleted the lines in web.config and everything works again.
I tried URL Rewrite feature, but I get an error.
"Cannot read configuration file due to insufficient permissions"
I am trying to fix with these instructions below, but the system asked me for user/password. I am as administrator, but those credentials didn't work.
Cannot read configuration file due to insufficient permissions
The HttpRedirectionModule is installed in the server. Also, RewriteModule
Did you install the HttpRedirect module? It is optional under IIS7+.
If that isn't it would help if you could post the detailed error message you get from hitting this locally if you can -- that will help narrow down the cause.
Finally, you might want to look into URL rewriting here, it is a new feature for IIS7+ that can handle simple url redirects like the above and much more.

make permission in IIS7

I have IIS7, web app is written on ASP.NET 1.1.
I need to see files and folders in the browser when adress as like http://localhost/MyProject.
Have to make permission for this? or...
so, help me please
UPD. Yes I know it. But when I did this I have this error
Line 215: </root>
Line 216: </log4net>
Line 217: <system.webServer>
Line 218: <directoryBrowse enabled="false" />
Line 219: </system.webServer>
After That(I read about this pronlrm on interner http://blogs.iis.net/bills/archive/2008/06/02/installing-asp-net-1-1-with-iis7-on-vista-and-windows-2008.aspx)
I have added to (%windir%\Microsoft.NET\Framework\v1.1.4322\config\machine.config)
this .
And the error gone.But I still can not browse files.
From IIS click on your website. Under IIS go to Directory Browsing and click Enable. See a more complete description on MSDN.

Resources