Sunday, January 2, 2011

IIS Issues and Troubleshooting

IIS Issues and Trouble Shooting:

How Query for IIS works:

When user opens the site then first request passes through its Internet Service Provider, then to the webserver.
Then it checks for the Host header value, if host headers are not found then it returns with the error.
Then check the headers from the below steps:
1.    Open IIS on the server.
2.    Go to the servername>Web Site>Domain Name.
3.    Right-click on the Web Site and select Properties.
4.    Select website Tag > advanced
5.    Then check whether the proper headers are added or not.

Basic Troubleshooting of Name resolution & Domain:

When request arrives for a domain then first check the DNS report of the domain whether it is pointing to the respective name servers.
If the Name server records are custom then update the client with our Name server records:

For further troubleshooting of the Website issues then you need to have detailed details of the errors in your browsers. For that you need to follow the below steps also provided the steps to users:


1.    In Internet Explorer 5.x and 6.x, on the Tools menu, click Internet Options.
2.    On the Advanced tab, under the Browsing section, click to uncheck the Show friendly   HTTP error messages box, and then click OK.
3.    Close the browser and then Start.

For ASP.NET Sites:

Ask the client to disable the Custom Error Mode from web. Config file to see the actual errors.

For ASP Sites:

1.    Open IIS on the server.
2.    Go to the servername>Web Site>Domain Name.
3.    Right-click on the Web Site and select Properties.
4.    Select Custom Errors > Select all HTTP error and set to Default.

HTTP Error 40x: Client error

HTTP Error 400: Bad Request

  • Due to malformed syntax, the request could not be understood by the server.
    The client should not repeat the request without modifications.
  • You are trying to open the URL with extensions which are blocked in Firewall.

HTTP Error 401: Access Denied

Cause:  When Anonymous access authentication is turned off for the Web service application, all the caller applications must provide the credentials before making any request. By default, the Web service client proxy does not inherit the credentials of the security context where the Web service client application is running.

1.    Resolution: To fix this issue, please follow these steps:
2.    Open IIS on the server.
3.    Go to the servername>Web Site>Domain Name.
4.    Right-click on the Web Site and select Properties.
5.    Select Directory Security > Edit >Anonymous access and Authentication Control
6.    Check whether Anonymous access is checked or unchecked. If its unchecked then check the box and apply the settings


Page not found for the Site

The following are some common causes of this error message:
  • The requested file has been renamed.
  • The requested file has been moved to another location and/or deleted.
  • The requested file is temporarily unavailable due to maintenance, upgrades, or other unknown causes.
  • The requested file does not exist.
  • IIS 6.0: The appropriate Web service extension or MIME type is not enabled.
Resolution: To fix this issue, please follow these steps:
  1. Open IIS on the server.
  2. Go to the servername>Web Site>Domain Name.
  3. Right-click on the Web Site and select Properties.
  4. Select Documents
  5. Add the default page of the site there.

HTTP Error 403.1 - Execute access forbidden.

The following are two common causes of this error message:
  1. You do not have enough Execute permissions. For example, you may receive this error message if you try to access an ASP page in a directory where permissions are set to none, or you try to execute a Common Gateway Interface (CGI) script in a directory with Scripts Only permissions.
To modify the Execute permissions, right-click the directory in the Microsoft Management Console (MMC), click Properties, click the Directory tab, and make sure that the Execute Permissions setting is appropriate for the content that you are trying to access.
  1. The script mappings for the file type that you are trying to execute is not set up to recognize the verb that you are using (for example, GET or POST).
To verify this, right-click the directory in the MMC, click Properties, click the Directory tab, click Configuration, and verify that the script mapping for the appropriate file type is set up to allow the verb that you are using.


HTTP Error 403.2 - Read access forbidden.

Verify that you have set up IIS to allow Read access to the directory. Also, if you are using a default document, verify that the document exists.

HTTP Error 403.3 - Write access forbidden.

Verify that the IIS permissions and the NTFS permissions are set up to grant Write access to the directory.

403.3 - Write access forbidden.

Verify that the IIS permissions and the NTFS permissions are set up to grant Write access to the directory. For additional information about how to resolve this problem,

HTTP Error 403.6 - Forbidden: IP address rejected

You are not authorized to view this page

The Web server you are attempting to reach has a list of IP addresses that are not allowed to access the Web site. The IP address of your browsing computer is on this list.

Cause: This error is caused when the server has a list of IP addresses that are not allowed to access the site, and the IP address you are using is in this list.

Resolution: To fix this issue, please follow these steps:

1.    Open IIS on the server.
2.    Go to the servername>Web Site>Domain Name.
3.    Right-click on the Web Site and select Properties.
4.    Select Directory Security>IP Address or domain name restrictions.
5.    Check granted all computers if you want all computer access the web site.

HTTP Error 50x – Server Error

500 - Internal server error

You see this error message for a wide variety of server-side errors. Your event viewer logs may contain more information about why this error occurs.
The 500 Internal Server Error is a "server-side" error, meaning the problem is not with client PC or Internet connection but instead is a problem with the web site's server.
Resolution: To fix this issue, please follow these steps:
  1. Check the permissions on the site.
  2. Check Application Pool is working or not. If it’s stopped then start it.
For IIS7 and above you need to enable the detailed error from IIS follow the below steps:

1.    Open IIS on the server.
2.    Go to the servername>Web Site>Select Domain Name.
3.    Then Select the Error pages > Select Edit Features Setting > Then select the Detailed error option and then save the settings

502 - Bad gateway.

Client can receive this error message when he try to run a CGI script that does not return a valid set of HTTP headers or blocked from Firewall.

Service Unavailable: 

Follow the below steps to troubleshoot the error.

  1. First check the application pool on which the site is running.
  2. Then check the Identity on which the application pool is running.
  3. After checking above settings then check the permissions on the site.
  4. If the permission for the identity of the application is not there then assign the READ permission only.
  5. Then check the Site after clearing the local cache.
Virtual Directory not exist in case of .Net application running from

Server Error in / Application


    1. While browsing the site like www.test.com/testing we got this error for asp.net sites. To trouble shoot the error check whether the Virtual Directory is created or not for the particular application. If it’s not created then create the Virtual Directory from the control panel what ever is applicable.
    2. Check the ASP.Net Version from the control panel whatever is applicable.

Web scripting not enabled 

Website errors also occur when web scripting is not enabling for the domains.

  1. If php site is there and it’s not displaying the site. Check the PHP is enabled for the domain from control panel
  2. If site is running on ASP.net versions then check for the ASP.Net versions.

Default Documents

Check for the default pages for the site. Below are the default pages:
1.    Index.htm
2.    Index.html
3.    Index.asp
4.    Index.php
5.    Index.asp
6.    Index.aspx
7.    Default.asp
8.    Default.aspx
9.    Default.php
10. Default.htm
11. Default.html
  

We also got error for the sites IIS password protects. To trouble shoot the error check the below contents in the web content.
This error generally appears because of the .htaccess and .htpasswd file residing in the root folder of the domain.
We need to delete those files to get the site working as those files are not compatible with Windows server.

Contact us/ enquiry form not working

There are cases where users complain that there contact us or enquiry form is not working. To investigate the issue we need to check the below things.
  1. First check in the script whether Email ID, Mail server setting, Port are mentioned correctly.
  2. Check whether the script is SMTP authenticated or not.
  3. The component (ASP Email, Jmail, CDOSYS etc) which is being used to send the mail is installed on the server or not.

Access database

There are issues when users used the access database. You need to check the permission on .mdb file. Permissions should be granted to Network service, ASPNET account to get the site working.
These are the common issues which occurs in IIS


Client complains that some extensions are not working from the server. To trouble shoot the issues follow the below Steps:

  1. First check the Firewall settings whether requested extension is allowed or not from the firewall.
  2. If its not allowed then first check the function of extension whether it is harmful or nor for server security.
  3. If they are enabled from the firewall then, Check whether Mime Type is added for the site or not.
From Helm Control Panel à Select the domain à Select Mime types à then add the requested Mime type

From IIS follow the below steps:
·         Open IIS on the server.
·         Go to the servername>Web Site>Domain Name.
·         Right-click on the Web Site and select Properties.
·         Then Select HTTP headers à At the bottom Select Mime type
·         Then add the requested Mime type


Thanks & Regards
Gaurav Singh