IIS TROUBLE SHOOTING ISSUES
Some Useful commands in IIS
MSTSC
INETMGR
SERVICES.MSC
GPEDIT.MSC
SECPOL.MSC
REGEDIT
REGEDT32
MMC
TSADMIN
ASPNET_REGIIS -I : To register aspnet
ASPNET_REGIIS -U : To Uninstall aspnet
iisapp.vbs : To check the list applications running on the iis.
NETSTART -ANO | FIND STR <PORT> : Verify IIS listening on the port or not.
PING <IP>
TRACEROUTE :
iisreset
iisreset/status
iisreset/stop
iisreset/start
______________________________________________________________________________
iisreset - restarts
all IIS services on the computer
iisreset
172.16.12.5 /stop - To stop IIS services on a remote computer with IP address
172.16.12.5
iisreset
172.16.12.5 /status - To verify that IIS services have been stopped on the
remote computer
iisreset /disable
- To prevent iisreset from being used to stop IIS services,
iisreset /stop -
stop all IIS services
________________________________________________________________
net stop w3svc -
To stop the WWW service only on your IIS computer
net start w3svc -
To start it again
net stop /y
iisadmin - To stop the IISAdmin service and all dependent IIS services
_______________________________________________________________
iisweb /stop
"Default Web Site" - To stop the Default Web Site only while leaving
other web sites running
iisweb /start
"Default Web Site" - To start it again
iisweb /create D:\HR
"Human Resources" /i 216.44.65.8 - The following command creates a
new web site named Human Resources on server with IP 216.44.65.8 and root
directory D:\HR
iisweb /create
D:\Corp "My Company" - The following command creates a new site named
My Company with root directory D:\Corp and IP address "All
Unassigned,"
_________________________________________________________________
iisvdir /create
"Human Resources" employees D:\resumes - The following command
creates a virtual directory within the Human Resources web site and maps alias
employees to physical directory D:\resumes:
iisvdir /query
"Human Resources" - list virtual directories within the Human
Resources site:
iisvdir /delete
"Human Resources\employees" - To delete the previously created
virtual directory
________________________________________________________________
iisback /backup
/b 28july04 - The following command backs up the metabase using the iisback.vbs
script and names the two backup files 28july04.MD0
iisback /list -
To view a list of the current metabase backups
_________________________________________________________________
iisapp - The
following command displays the process ID (PID) of all worker processes running
on the computer,
iisapp /p 2765 -
The following command displays the application pool to which the worker process
having PID 2765 is assigned
iisftp /create
C:\ftpstuff "My FTP Site" /i 172.16.12.50 /dontstart - The following
command creates a new FTP site named My FTP Site with root directory
C:\ftpstuff and IP address 172.16.12.50
iisftp /start
"My FTP Site" - To start the new site,
iisftp /query -
To display a list of all FTP sites on your server
________________________________________________________________
net stop msftpsvc
- You can also stop and start all FTP sites on your server using the following
commands
net start
msftpsvc
net stop dns -
You can use the net.exe command to stop or start the DNS Server service on the
local machine
net start dns
_________________________________________________________________
Tools for Trouble shooting IIS issues.
1.Debug diag
2.Log parser
3.Fiddler
4.Process Monitor
5.Resource Monitor
____________________________________________________________________________
HTTP Status Codes
Included in the HTTP server response data for each request is a code number indicating the result of the request. These result codes are three-digit numbers divided into categories as follows:
100-199 : Informational status
200-299 : Success status
300-399 : Redirection status
400-499 : Client errors
500-599 : Server errors
Informational
100 - Continue
A status code of 100 indicates that (usually the first) part of a request has been received without any problems, and that the rest of the request should now be sent.
101 - Switching Protocols
HTTP 1.1 is just one type of protocol for transferring data on the web, and a status code of 101 indicates that the server is changing to the protocol it defines in the "Upgrade" header it returns to the client. For example, when requesting a page, a browser might receive a statis code of 101, followed by an "Upgrade" header showing that the server is changing to a different version of HTTP.
________________________________________________________________Successful
200 - OK
The 200 status code is by far the most common returned. It means, simply, that the request was received and understood and is being processed.
201 - Created
A 201 status code indicates that a request was successful and as a result, a resource has been created (for example a new page).
202 - Accepted
The status code 202 indicates that server has received and understood the request, and that it has been accepted for processing, although it may not be processed immediately.
203 - Non-Authoritative Information
A 203 status code means that the request was received and understood, and that information sent back about the response is from a third party, rather than the original server. This is virtually identical in meaning to a 200 status code.
204 - No Content
The 204 status code means that the request was received and understood, but that there is no need to send any data back.
205 - Reset Content
The 205 status code is a request from the server to the client to reset the document from which the original request was sent. For example, if a user fills out a form, and submits it, a status code of 205 means the server is asking the browser to clear the form.
206 - Partial Content
A status code of 206 is a response to a request for part of a document. This is used by advanced caching tools, when a user agent requests only a small part of a page, and just that section is returned.
_________________________________________________________________
Redirection
300 - Multiple Choices
The 300 status code indicates that a resource has moved. The response will also include a list of locations from which the user agent can select the most appropriate.
301 - Moved Permanently
A status code of 301 tells a client that the resource they asked for has permanently moved to a new location. The response should also include this location. It tells the client to use the new URL the next time it wants to fetch the same resource.
302 - Found
A status code of 302 tells a client that the resource they asked for has temporarily moved to a new location. The response should also include this location. It tells the client that it should carry on using the same URL to access this resource.
303 - See Other
A 303 status code indicates that the response to the request can be found at the specified URL, and should be retrieved from there. It does not mean that something has moved - it is simply specifying the address at which the response to the request can be found.
304 - Not Modified
The 304 status code is sent in response to a request (for a document) that asked for the document only if it was newer than the one the client already had. Normally, when a document is cached, the date it was cached is stored. The next time the document is viewed, the client asks the server if the document has changed. If not, the client just reloads the document from the cache.
305 - Use Proxy
A 305 status code tells the client that the requested resource has to be reached through a proxy, which will be specified in the response.
307 - Temporary Redirect
307 is the status code that is sent when a document is temporarily available at a different URL, which is also returned. There is very little difference between a 302 status code and a 307 status code. 307 was created as another, less ambiguous, version of the 302 status code.
_________________________________________________________________Client Error
400 - Bad Request
A status code of 400 indicates that the server did not understand the request due to bad syntax.
401 - Unauthorized
A 401 status code indicates that before a resource can be accessed, the client must be authorised by the server.
402 - Payment Required
The 402 status code is not currently in use, being listed as "reserved for future use".
403 - Forbidden
A 403 status code indicates that the client cannot access the requested resource. That might mean that the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked.
404 - Not Found
The best known of them all, the 404 status code indicates that the requested resource was not found at the URL given, and the server has no idea how long for.
405 - Method Not Allowed
A 405 status code is returned when the client has tried to use a request method that the server does not allow. Request methods that are allowed should be sent with the response (common request methods are POST and GET).
406 - Not Acceptable
The 406 status code means that, although the server understood and processed the request, the response is of a form the client cannot understand. A client sends, as part of a request, headers indicating what types of data it can use, and a 406 error is returned when the response is of a type not i that list.
407 - Proxy Authentication Required
The 407 status code is very similar to the 401 status code, and means that the client must be authorised by the proxy before the request can proceed.
408 - Request Timeout
A 408 status code means that the client did not produce a request quickly enough. A server is set to only wait a certain amount of time for responses from clients, and a 408 status code indicates that time has passed.
409 - Conflict
A 409 status code indicates that the server was unable to complete the request, often because a file would need to be editted, created or deleted, and that file cannot be editted, created or deleted.
410 - Gone
A 410 status code is the 404's lesser known cousin. It indicates that a resource has permanently gone (a 404 status code gives no indication if a resource has gine permanently or temporarily), and no new address is known for it.
411 - Length Required
The 411 status code occurs when a server refuses to process a request because a content length was not specified.
412 - Precondition Failed
A 412 status code indicates that one of the conditions the request was made under has failed.
413 - Request Entity Too Large
The 413 status code indicates that the request was larger than the server is able to handle, either due to physical constraints or to settings. Usually, this occurs when a file is sent using the POST method from a form, and the file is larger than the maximum size allowed in the server settings.
414 - Request-URI Too Long
The 414 status code indicates the the URL requested by the client was longer than it can process.
415 - Unsupported Media Type A 415 status code is returned by a server to indicate that part of the request was in an unsupported format.
416 - Requested Range Not Satisfiable
A 416 status code indicates that the server was unable to fulfill the request. This may be, for example, because the client asked for the 800th-900th bytes of a document, but the document was only 200 bytes long.
417 - Expectation Failed
The 417 status code means that the server was unable to properly complete the request. One of the headers sent to the server, the "Expect" header, indicated an expectation the server could not meet.
_________________________________________________________________Server Error
500 - Internal Server Error
A 500 status code (all too often seen by Perl programmers) indicates that the server encountered something it didn't expect and was unable to complete the request.
501 - Not Implemented
The 501 status code indicates that the server does not support all that is needed for the request to be completed.
502 - Bad Gateway
A 502 status code indicates that a server, while acting as a proxy, received a response from a server further upstream that it judged invalid.
503 - Service Unavailable
A 503 status code is most often seen on extremely busy servers, and it indicates that the server was unable to complete the request due to a server overload.
504 - Gateway Timeout
A 504 status code is returned when a server acting as a proxy has waited too long for a response from a server further upstream.
505 - HTTP Version Not Supported
A 505 status code is returned when the HTTP version indicated in the request is no supported. The response should indicate which HTTP versions are supported.
________________________________________________________________________100 - Continue
A status code of 100 indicates that (usually the first) part of a request has been received without any problems, and that the rest of the request should now be sent.
101 - Switching Protocols
HTTP 1.1 is just one type of protocol for transferring data on the web, and a status code of 101 indicates that the server is changing to the protocol it defines in the "Upgrade" header it returns to the client. For example, when requesting a page, a browser might receive a statis code of 101, followed by an "Upgrade" header showing that the server is changing to a different version of HTTP.
200 - OK
The 200 status code is by far the most common returned. It means, simply, that the request was received and understood and is being processed.
201 - Created
A 201 status code indicates that a request was successful and as a result, a resource has been created (for example a new page).
202 - Accepted
The status code 202 indicates that server has received and understood the request, and that it has been accepted for processing, although it may not be processed immediately.
203 - Non-Authoritative Information
A 203 status code means that the request was received and understood, and that information sent back about the response is from a third party, rather than the original server. This is virtually identical in meaning to a 200 status code.
204 - No Content
The 204 status code means that the request was received and understood, but that there is no need to send any data back.
205 - Reset Content
The 205 status code is a request from the server to the client to reset the document from which the original request was sent. For example, if a user fills out a form, and submits it, a status code of 205 means the server is asking the browser to clear the form.
206 - Partial Content
A status code of 206 is a response to a request for part of a document. This is used by advanced caching tools, when a user agent requests only a small part of a page, and just that section is returned.
_________________________________________________________________
Redirection
300 - Multiple Choices
The 300 status code indicates that a resource has moved. The response will also include a list of locations from which the user agent can select the most appropriate.
301 - Moved Permanently
A status code of 301 tells a client that the resource they asked for has permanently moved to a new location. The response should also include this location. It tells the client to use the new URL the next time it wants to fetch the same resource.
302 - Found
A status code of 302 tells a client that the resource they asked for has temporarily moved to a new location. The response should also include this location. It tells the client that it should carry on using the same URL to access this resource.
303 - See Other
A 303 status code indicates that the response to the request can be found at the specified URL, and should be retrieved from there. It does not mean that something has moved - it is simply specifying the address at which the response to the request can be found.
304 - Not Modified
The 304 status code is sent in response to a request (for a document) that asked for the document only if it was newer than the one the client already had. Normally, when a document is cached, the date it was cached is stored. The next time the document is viewed, the client asks the server if the document has changed. If not, the client just reloads the document from the cache.
305 - Use Proxy
A 305 status code tells the client that the requested resource has to be reached through a proxy, which will be specified in the response.
307 - Temporary Redirect
307 is the status code that is sent when a document is temporarily available at a different URL, which is also returned. There is very little difference between a 302 status code and a 307 status code. 307 was created as another, less ambiguous, version of the 302 status code.
_________________________________________________________________Client Error
400 - Bad Request
A status code of 400 indicates that the server did not understand the request due to bad syntax.
401 - Unauthorized
A 401 status code indicates that before a resource can be accessed, the client must be authorised by the server.
402 - Payment Required
The 402 status code is not currently in use, being listed as "reserved for future use".
403 - Forbidden
A 403 status code indicates that the client cannot access the requested resource. That might mean that the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked.
404 - Not Found
The best known of them all, the 404 status code indicates that the requested resource was not found at the URL given, and the server has no idea how long for.
405 - Method Not Allowed
A 405 status code is returned when the client has tried to use a request method that the server does not allow. Request methods that are allowed should be sent with the response (common request methods are POST and GET).
406 - Not Acceptable
The 406 status code means that, although the server understood and processed the request, the response is of a form the client cannot understand. A client sends, as part of a request, headers indicating what types of data it can use, and a 406 error is returned when the response is of a type not i that list.
407 - Proxy Authentication Required
The 407 status code is very similar to the 401 status code, and means that the client must be authorised by the proxy before the request can proceed.
408 - Request Timeout
A 408 status code means that the client did not produce a request quickly enough. A server is set to only wait a certain amount of time for responses from clients, and a 408 status code indicates that time has passed.
409 - Conflict
A 409 status code indicates that the server was unable to complete the request, often because a file would need to be editted, created or deleted, and that file cannot be editted, created or deleted.
410 - Gone
A 410 status code is the 404's lesser known cousin. It indicates that a resource has permanently gone (a 404 status code gives no indication if a resource has gine permanently or temporarily), and no new address is known for it.
411 - Length Required
The 411 status code occurs when a server refuses to process a request because a content length was not specified.
412 - Precondition Failed
A 412 status code indicates that one of the conditions the request was made under has failed.
413 - Request Entity Too Large
The 413 status code indicates that the request was larger than the server is able to handle, either due to physical constraints or to settings. Usually, this occurs when a file is sent using the POST method from a form, and the file is larger than the maximum size allowed in the server settings.
414 - Request-URI Too Long
The 414 status code indicates the the URL requested by the client was longer than it can process.
415 - Unsupported Media Type A 415 status code is returned by a server to indicate that part of the request was in an unsupported format.
416 - Requested Range Not Satisfiable
A 416 status code indicates that the server was unable to fulfill the request. This may be, for example, because the client asked for the 800th-900th bytes of a document, but the document was only 200 bytes long.
417 - Expectation Failed
The 417 status code means that the server was unable to properly complete the request. One of the headers sent to the server, the "Expect" header, indicated an expectation the server could not meet.
_________________________________________________________________Server Error
500 - Internal Server Error
A 500 status code (all too often seen by Perl programmers) indicates that the server encountered something it didn't expect and was unable to complete the request.
501 - Not Implemented
The 501 status code indicates that the server does not support all that is needed for the request to be completed.
502 - Bad Gateway
A 502 status code indicates that a server, while acting as a proxy, received a response from a server further upstream that it judged invalid.
503 - Service Unavailable
A 503 status code is most often seen on extremely busy servers, and it indicates that the server was unable to complete the request due to a server overload.
504 - Gateway Timeout
A 504 status code is returned when a server acting as a proxy has waited too long for a response from a server further upstream.
505 - HTTP Version Not Supported
A 505 status code is returned when the HTTP version indicated in the request is no supported. The response should indicate which HTTP versions are supported.
IIS Trouble shooting Procedure:
1.Ask the customer to give full link (URL) or Check the ticketing tool for error and get the url from the attachement?
www.example.com/memos/......
2.Browse the url from your side?
3.Check and confirm that whether your also getting the same error or not?
4.Based on Error type (list errors provided above) fallow trouble shooting?
100-199 : Informational status
200-299 : Success status
300-399 : Redirection status
400-499 : Client errors
500-599 : Server errors
5.If your not getting error ?
Remove friendly error messages to get the actual error message?
ie-tools-internet option-advance tab-
Step-by-Step Process
1) Do Nslookup www.example.com
It will give the ip and port of the server.
2)Log in to the server.
Go to start >> run >> type mstsc>> provide ip or hostname with username&password login to the server.
Note:If you got Number of connections excedded? Then login to other server in the same domain
Go to start >> run >> type tsadmin >> connect to the server >> provide host/iP and check the connections
if active or not.Logoff one off inactive connection and then log in to server.
3)Check IIS is working or not?
Go to start >> run >> type inetmgr
4)inetmgr if iis is not opeing then check for IIS services are running or not?
Go to start >> run >> type services.msc
5)In services.msc we need to have the basic services.
1)iisadmin,
2)www service,
3)ftp
6)ping the url on same server.
ping www.example.com
if service unavailable--apppool recycle
Depedning on error codes start trouble shooting issue.
8)If error related to web server then
400 series
-----------
system-full control
administrators- fC
authenticated users - default
interactive, network,
8.1)eventvwr check the log's to find out the error
iislog:systemroot\System32\LogFiles\W3SVCnumber
httperror:systemroot\System32\LogFiles\HTTPERR.
1)Application,
2)Security,
3)System
8.2)inetmgr/website/default.aspx right click browse.
wether the site is working internally or not.
1)static (html) Http.sys
2)ISAPI (asp,asp.net) dll
3)CGI
Create a test page on the server and check wether it is working or not.
<HTML>
<BODY>
<H3>Hello World</H3>
</BODY>
</HTML>
test.aspx
test.asp
Create the data link (UDL) file
1.Right-click the Windows desktop, point to New, and then click Text Document. A new file is created by default (New Text Document.txt).
2.Open Windows Explorer, and on the Tools menu, click Folder Options. On the View tab, clear the Hide file extensions for known file types check box and then click OK.
3.Right-click the Text Document you created in step 1, choose Rename, and then change the name and extension of the file to: test.udl
4.A warning might appear, explaining that changing file extensions could cause files to become unusable. Disregard this warning.
5.You can store the (sophos.udl) file anywhere on your system or network.
6.Double-click the (test.udl) file or you can optionally right-click it, and then click Properties. This opens the Data Link Properties dialog box. You are now ready to connect to your data source.
Testing connectivity to a SQL server
1.When you have opened the data link properties select the Provider tab.
2.From the list of OLE DB Provider(s) select ‘Microsoft OLE DB for SQL Server’.
3.Click the next button to move to the Connection tab.
4.Enter the SQL server’s hostname followed by a backslash (\) in the first box. E.g. windows2003server\test
5.Under ‘Enter information to log on to the server’ select one of the radio buttons...
Note:get the information from webconfig.xml file under connection string location:
Use Windows NT Integrated security’ if the SQL server uses Windows authentication
User a specific user name and password’ if the SQL server uses SQL authentication.
6.Under ‘Select the database on the server’ click on the drop down list to view the databases that are available.
7.Select the require database and click the "Test Connection" button.
8.If necessary record any error seen and forward to technical support. Otherwise click OK to close the properties window and save the connection settings.
If find any error check throughly and inform database team regarding the error:
May be sql/database server down or not connecting.
________________________________________________________________________________
HTTP
Error 404.3 - Not Found
Description: The page you are requesting cannot be served because of the
Multipurpose Internet Mail Extensions (MIME) map policy that is configured
on the Web server. The page you requested has a file name extension that is
not recognized, and therefore is not allowed.
Error Code: 0x80070032
Notification: ExecuteRequestHandler
Module: StaticFileModule
Requested URL: http://localhost:8080/mt.cgi
Physical Path: D:\vistaDoc\pix\tools\bin\MT-3.31\mt.cgi
Logon User: Anonymous
Logon Method: Anonymous
Handler: StaticFile
Causes:
The appropriate MIME map is not enabled for the web site or
application
Solution:
Verify that the MIME map is enabled or add the MIME map for the site.
1. From the Web Management tool, open a connection to the website.
2. Double click the MIME Types Management feature.
3. Verify that the MIME type is in the list and is not set to
Removed.
4. If the MIME type is in the list and set to Removed, highlight
the MIME Type in the list, and in the MIME Types Tasks, click
Restore.
5. If the MIME Type is not in the list, complete the MIME Type
information in the Tasks pane under New MIME Type, and then
click Add.
NOTE: Make sure that this MIME mapping is needed for your Web server
before adding it to the list.
Set up a new Failed Request Trace rule for this HTTP status code.
1. Use the IIS Web Management tool to open a connection to the Web
server where the problem is occurring.
2. In the tree view, navigate to the Web site, and then click to
select it.
3. In the Tasks pane, click Failed Request Tracing.
4. Check Enable Logging for this Site, specify a logging folder or
use the default log folder, and then click OK
5. Open the Failed Request Tracing Rules feature and click New
Rule in the Tasks pane.
6. Specify the content type to monitor and then click Next.
7. Check the Status Codes checkbox, type 404.3 in the Edit box,
and then click Next.
8. In the Providers area, make sure that the WWW Server is checked
and highlighted, and that in Provider Properties, the Verbosity
level is set to Verbose.
9. Click FinishRequest the page that generated the 404.3 error and
then look at the tracing file that was created for the request.
This file is located in the logging folder you specified in
Step 4.
This means that you do not have a mapping for *.cgi to the CGI/ISAPI that
you want to handle that extension - seems like you probably want perl to
handle that request - you need to add something like this to the handlers
like
Solution: In iis7 go to folder ( %windir%\system32\inetsrv)
configuration file called applicationhost.config open and -
find the section named <handlers> - this line would go at the
top of that collection.
<add name="ISAPI-perl" path="*.cgi" verb="*" modules="IsapiModule"
scriptProcessor="path to perl isapi" resourceType="File />
or
<add name="CGI-perl" path="*.cgi" verb="*" modules="CgiModule"
scriptProcessor="path to perl cgi" resourceType="File />
__________________________________________________________________________________________
Description: The page you are requesting cannot be served because of the
Multipurpose Internet Mail Extensions (MIME) map policy that is configured
on the Web server. The page you requested has a file name extension that is
not recognized, and therefore is not allowed.
Error Code: 0x80070032
Notification: ExecuteRequestHandler
Module: StaticFileModule
Requested URL: http://localhost:8080/mt.cgi
Physical Path: D:\vistaDoc\pix\tools\bin\MT-
Logon User: Anonymous
Logon Method: Anonymous
Handler: StaticFile
Causes:
The appropriate MIME map is not enabled for the web site or
application
Solution:
Verify that the MIME map is enabled or add the MIME map for the site.
1. From the Web Management tool, open a connection to the website.
2. Double click the MIME Types Management feature.
3. Verify that the MIME type is in the list and is not set to
Removed.
4. If the MIME type is in the list and set to Removed, highlight
the MIME Type in the list, and in the MIME Types Tasks, click
Restore.
5. If the MIME Type is not in the list, complete the MIME Type
information in the Tasks pane under New MIME Type, and then
click Add.
NOTE: Make sure that this MIME mapping is needed for your Web server
before adding it to the list.
Set up a new Failed Request Trace rule for this HTTP status code.
1. Use the IIS Web Management tool to open a connection to the Web
server where the problem is occurring.
2. In the tree view, navigate to the Web site, and then click to
select it.
3. In the Tasks pane, click Failed Request Tracing.
4. Check Enable Logging for this Site, specify a logging folder or
use the default log folder, and then click OK
5. Open the Failed Request Tracing Rules feature and click New
Rule in the Tasks pane.
6. Specify the content type to monitor and then click Next.
7. Check the Status Codes checkbox, type 404.3 in the Edit box,
and then click Next.
8. In the Providers area, make sure that the WWW Server is checked
and highlighted, and that in Provider Properties, the Verbosity
level is set to Verbose.
9. Click FinishRequest the page that generated the 404.3 error and
then look at the tracing file that was created for the request.
This file is located in the logging folder you specified in
Step 4.
This means that you do not have a mapping for *.cgi to the CGI/ISAPI that
you want to handle that extension - seems like you probably want perl to
handle that request - you need to add something like this to the handlers
like
Solution: In iis7 go to folder ( %windir%\system32\inetsrv)
configuration file called applicationhost.config open and -
find the section named <handlers> - this line would go at the
top of that collection.
<add name="ISAPI-perl" path="*.cgi" verb="*" modules="IsapiModule"
scriptProcessor="path to perl isapi" resourceType="File />
or
<add name="CGI-perl" path="*.cgi" verb="*" modules="CgiModule"
scriptProcessor="path to perl cgi" resourceType="File />
__________________________________________________________________________________________
How to switch between the 32-bit versions of ASP.NET 1.1 and the 64-bit version of ASP.NET 2.0
ASP.NET 1.1, 32-bit version
To run the 32-bit version of ASP.NET 1.1, follow these steps:
1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to enable the 32-bit mode:
cscript %SYSTEMDRIVE%\inetpub\
W3SVC/AppPools/
3. Type the following command to install the version of ASP.NET 1.1 and
to install the script maps at the IIS root and under:
%SYSTEMROOT%\Microsoft.NET\
4. Make sure that the status of ASP.NET version 1.1.4322 is set to
Allowed in the Web service extension list in Internet Information
Services Manager.
ASP.NET 2.0, 32-bit version
To run the 32-bit version of ASP.NET 2.0, follow these steps:
1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to enable the 32-bit mode:
cscript %SYSTEMDRIVE%\inetpub\
W3SVC/AppPools/
3. Type the following command to install the version of ASP.NET 2.0
(32-bit) and to install the script maps at the IIS root and under:
%SYSTEMROOT%\Microsoft.NET\
4. Make sure that the status of ASP.NET version 2.0.50727 (32-bit) is
set to Allowed in the Web service extension list in Internet
Information Services Manager.
ASP.NET 2.0, 64-bit version
To run the 64-bit version of ASP.NET 2.0, follow these steps:
1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to disable the 32-bit mode:
cscript %SYSTEMDRIVE%\inetpub\
W3SVC/AppPools/
3. Type the following command to install the version of ASP.NET 2.0 and
to install the script maps at the IIS root and under:
%SYSTEMROOT%\Microsoft.NET\
-i
4. Make sure that the status of ASP.NET version 2.0.50727 is set to
Allowed in the Web service extension list in Internet Information
Services Manager.
Note The build version of ASP.NET 2.0 may differ depending on what the
currently released build version is. These steps are for build version
2.0.50727.
________________________________________________________________________________________
Verify that an application pool worker process is running
To perform this procedure, you must have membership in Administrators, or
you must have been delegated the appropriate authority.
To verify that an application pool worker process is running:
1. Click Start, click Control Panel, and then click Administrative Tools
.
2. Right-click Internet Information Services (IIS) Manager and select
Run as administrator.
3. In the Connections pane, select the computer name.
4. In Features View, under the Feature Name column heading, double-click
the Worker Processes management feature. A list of currently active
application pools and worker processes will appear.
5. The State column for the worker process will indicate Running if the
worker process is running.
6. You can also view currently executing requests by right-clicking the
application pool name or worker process id and selecting View Current
Requests.
Verify that an application pool worker process is running
To perform this procedure, you must have membership in Administrators, or
you must have been delegated the appropriate authority.
To verify that an application pool worker process is running:
1. Click Start, click Control Panel, and then click Administrative Tools
.
2. Right-click Internet Information Services (IIS) Manager and select
Run as administrator.
3. In the Connections pane, select the computer name.
4. In Features View, under the Feature Name column heading, double-click
the Worker Processes management feature. A list of currently active
application pools and worker processes will appear.
5. The State column for the worker process will indicate Running if the
worker process is running.
6. You can also view currently executing requests by right-clicking the
application pool name or worker process id and selecting View Current
Requests.
_______________________________________________________________________________________
Troubleshooting
IIS application hangs / unresponsiveness
We recently had a cloud server client contact us about problems encountered
when exporting data from SQL Server via a webpage. This webpage would
access data from a SQL table and aggregate it into an Excel file. When the
client would try to run this process, the CPU for the worker process would
spike and the Excel spreadsheet would never generate. In order to restore
the website functionality, the client would reset IIS. He reached out to us
for help in resolving the underlying problem. Since this is a production
server, time was of the essence to resolve this issue with as little impact
for the cloud server as possible.
Note: I will provide screenshots of the applications/processes that I used
but this is not live data related to the actual troubleshooting done on the
cloud server.
Windows Server 2008 R2 and IIS 7 have some great built-in utilities to aid
in tracking down application ‘hangs’. I specifically used Resource Monitor,
Performance Monitor and the Worker Processes IIS utility. I also used Debug
Diagnostics to generate a report based on high CPU of the worker process
itself.
The first utility that I used was the IIS Worker Process module which
provides the ability to ‘look’ inside the Worker Process and view currently
executing requests. To access this module, open IIS Manager and click on
your server name. In the Features View panel, scroll down until you see the
Worker Processes Icon and double click on it.
We recently had a cloud server client contact us about problems encountered
when exporting data from SQL Server via a webpage. This webpage would
access data from a SQL table and aggregate it into an Excel file. When the
client would try to run this process, the CPU for the worker process would
spike and the Excel spreadsheet would never generate. In order to restore
the website functionality, the client would reset IIS. He reached out to us
for help in resolving the underlying problem. Since this is a production
server, time was of the essence to resolve this issue with as little impact
for the cloud server as possible.
Note: I will provide screenshots of the applications/processes that I used
but this is not live data related to the actual troubleshooting done on the
cloud server.
Windows Server 2008 R2 and IIS 7 have some great built-in utilities to aid
in tracking down application ‘hangs’. I specifically used Resource Monitor,
Performance Monitor and the Worker Processes IIS utility. I also used Debug
Diagnostics to generate a report based on high CPU of the worker process
itself.
The first utility that I used was the IIS Worker Process module which
provides the ability to ‘look’ inside the Worker Process and view currently
executing requests. To access this module, open IIS Manager and click on
your server name. In the Features View panel, scroll down until you see the
Worker Processes Icon and double click on it.
When you open this feature, you will see all running application pools
listed along with the current metrics (Process Id, CPU% usage, Private
Bytes (KB), and Virtual Bytes (KB). Select the application pool that you
would like to see requests for and then click View Current Requests in the
Actions pane.
Any requests that take longer than 0 seconds to complete will be displayed
here. You can refresh this screen using F5 like other Microsoft
applications. The situation that I was troubleshooting had requests that
were never completing so the Time Elapsed continued to increase until an
IIS Reset was performed.
Based on this information, I launched Resource Monitor to get additional
information on where the problem was occurring. I sorted the running
processes and placed a check mark beside the w3wp.exe process that I was
gathering information about. This places it at the top of the CPU list as
seen below.
Resource monitor provides the ability to view the wait chain for any
process. Simply right click on the process and choose Analyze Wait Chain.
During the troubleshooting, the Wait Chain showed a single IIS thread that
was in a Waiting for Response status. The image below was taken from a
server that is functioning as expected.
For additional information about Wait Chains, you can access the link
provided above at http://msdn.microsoft.com/en-
(VS.85).aspx.
During my troubleshooting, the wait chain for the w3wp.exe process was
waiting on IIS threads to complete. Based on this information, the problem
appeared to be the way that the application was requesting the data from
the SQL database rather than any connectivity/timing issues between the two
applications.
I then setup a debug diagnostic rule to capture performance data. This
option assists with troubleshooting problems including high CPU, deadlocks,
long HTTP response times, and .Net Memory issues. I selected the HTTP
Response Times option and left the URL to monitor blank. This monitored all
IIS requests and created a dump file based on the long HTTP response time
for the application in question.
Once I had captured the data based on the long wait time, it was just a
matter of analyzing the file to see if it provided any pointers to resolve
the problem. In evaluating the report that was generated, the high CPU
usage was caused by string concatenation rather than using a string builder
and appending the data. The answers are not always this easy to find, but
in this instance following the troubleshooting trail from looking at the
actual web requests within the worker process to the worker process itself
and eventually to the code methods, we were able to resolve this in a
timely manner which led to a happy client for us – and a happy customer for
our client.
_____________________________________________________________________________________
HTTP Error 404 - Page Not Found, File Not Found ,Directory Not Found
Today I have been fighting with a problem on our new IIS6 testing
environments. I've installed all the software onto the servers and then
opened IIS and browsed to one of the .aspx pages in the newly installed
website. Every time that I did this I received a Page Not Found HTTP 404
error. When I browsed to a .htm or .html file, that file was appropriately
displayed in the browser. The next thing I tried was opening Internet
Explorer and manually entering the URL to the .aspx page. Still no luck,
and yes the .htm and .html pages worked just fine. I found a web service
that was installed on the server and tried to open the .asmx file only to
get the 404 error again.
After doing some research I finally figured out what it was. First I'll
explain the software installed on the server. The box is Windows 2003
Standard Edition with IIS6, MS SOAP Toolkit 2.0 SP2, MSXML 4.0 Parser and
SDK, a whole slew of Windows Updates and the Windows Support Tools. Don't
ask why we have some of these things installed because I don't know the
answer. I only get the box with a preconfigured build on it.
The fix. Open IIS, expand the server node and select the Web Services
Extensions folder. In the Detail pane on the right hand side you will see a
listing of the Web Service Extensions that are installed and their Status.
In that list you should see ASP .NET v1.1.4322 (if you're running the .NET
1.1 framework) and the Status for it will be set to Prohibited. Select the
ASP .NET v1.1.4322 item from the list and click the Allow button
immediately to it's left. The Status will change from Prohibited to Allowed
and you will now be able to browse to you .aspx and .asmx pages.
HTTP Error 404 - File Not Found ,Directory Not Found
Cause:
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.
A virtual directory is mapped to the root of a drive on another
server.
___________________________________________________________________________HTTP Error 404 - Page Not Found, File Not Found ,Directory Not Found
Today I have been fighting with a problem on our new IIS6 testing
environments. I've installed all the software onto the servers and then
opened IIS and browsed to one of the .aspx pages in the newly installed
website. Every time that I did this I received a Page Not Found HTTP 404
error. When I browsed to a .htm or .html file, that file was appropriately
displayed in the browser. The next thing I tried was opening Internet
Explorer and manually entering the URL to the .aspx page. Still no luck,
and yes the .htm and .html pages worked just fine. I found a web service
that was installed on the server and tried to open the .asmx file only to
get the 404 error again.
After doing some research I finally figured out what it was. First I'll
explain the software installed on the server. The box is Windows 2003
Standard Edition with IIS6, MS SOAP Toolkit 2.0 SP2, MSXML 4.0 Parser and
SDK, a whole slew of Windows Updates and the Windows Support Tools. Don't
ask why we have some of these things installed because I don't know the
answer. I only get the box with a preconfigured build on it.
The fix. Open IIS, expand the server node and select the Web Services
Extensions folder. In the Detail pane on the right hand side you will see a
listing of the Web Service Extensions that are installed and their Status.
In that list you should see ASP .NET v1.1.4322 (if you're running the .NET
1.1 framework) and the Status for it will be set to Prohibited. Select the
ASP .NET v1.1.4322 item from the list and click the Allow button
immediately to it's left. The Status will change from Prohibited to Allowed
and you will now be able to browse to you .aspx and .asmx pages.
HTTP Error 404 - File Not Found ,Directory Not Found
Cause:
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.
A virtual directory is mapped to the root of a drive on another
server.
Thanks to post like this document, this is easy way to lean basic things.
ReplyDeleteThanks for great information... very useful and simple to understand. Hope we can see more interesting topics from you...
ReplyDeleteThe new TSR is certainly a treat to use. It is very helpful and beneficial for the employees working in a multinational organization.
ReplyDelete