||IIS / Tools / Crash & Hang (12) blog.crowe.co.nz.Models.Category
IIS / Tools / Crash & Hang
I came accross this posting on www.iis.net this morning and thought I should post it here as it could be relevant to someone in the near future.
When using Failed Request Tracing, you are unable to configure or use the ASP.Net trace provider (it does not show up in the list of providers to select when creating a new trace rule) even after ensuring that ASP.net & .Net extensibility are installed.
This is a known setup timing issue that causes the ASP.net provider definition to get accidentally deleted. It has been fixed in current Longhorn Server & Vista SP1 builds.
Workaround is to do the following:
Hope this helps you out in the mean time.
Program Manager - IIS
Release/Proj Mgmt & Support/Health/Instr/Tracing/Logging
DownloadCENTER for IIS.net has been released!
The DownloadCENTER at IIS.net, is a community hotspot for discovering, sharing, reviewing and promoting IIS-related solutions in a single place. Dozens of existing downloads, for all versions of IIS – both from Microsoft and the community – are already available in DownloadCENTER today.
This new feature of IIS.net is particularly relevant with the release of IIS7 in Windows Vista. The latest release of Microsoft’s Web server has a completely modular architecture which features over forty pluggable components that can be easily added, removed or even replaced with custom implementations.
This powerful extensibility support is available to both .NET and C/C++ developers. In the future, DownloadCENTER is expected to house a large number of IIS7 extensions submitted by not only the IIS team but the developers and partner ISVs of the IIS community as well.
To learn more about the DownloadCenter, read IIS Product Unit Manager, Bill Staples’ blog post about it or check it out yourself today!
This code will allow you to check if there are IIS applications which are configured to use multiple version of the .NET framework.
The code enumerates all the Application Pools and then find all of the applications in that pool. It then checks for the version of the .NET framework which handles the .ASPX file extension.
It saves the unique versions of the .NET Framework found and if it finds multiple versions installed will list all of the applications using that Application Poll and display the path and the version being used. This will allow you to find a potential problem which could be hard to track down normally.
You can download the source code here.
option explicit dim AppsInPool, objAppPool, index, IISObj, IISPath, Version, pos Dim Versions(), objAppPools function FindASPXScriptMapVersion(ScriptMaps) Dim pos, ScriptMap for pos = lbound(ScriptMaps) to UBOund(ScriptMaps) ScriptMap = lcase(ScriptMaps(POS)) if (left(ScriptMap, 5) = ".aspx") then FindASPXScriptMapVersion = mid(ScriptMap, 42) FindASPXScriptMapVersion = left(FindASPXScriptMapVersion, _ instr(FindASPXScriptMapVersion, "\")-1) exit function end if next FindASPXScriptMapVersion = "" end function function AddVersion(Version, Path) dim Found, pos Found = false for pos = lbound(Versions) to UBound(Versions)-1 if (Versions(pos) = Version) then Found = true end if next if (Found = false) then redim preserve Versions(ubound(Versions)+1) Versions(ubound(Versions)-1)= Version end if end function Set objAppPools = GetObject("IIS://localhost/W3SVC/AppPools") for each objAppPool in objAppPools Redim Versions(0) Set objAppPool = GetObject("IIS://localhost/W3SVC/AppPools/" & objAppPool.Name ) WScript.echo objAppPool.Name AppsInPool= objAppPool.EnumAppsInPool() if (ubound(AppsInPool) = -1) then WScript.echo vbtab & "No applications using this pool!" else for index = lbound(AppsInPool) to UBound(AppsInPool) IISPath = AppsInPool(index) IISPath = "IIS://localhost/" & mid(IISPath,5, len(IISPath)-5) set IISObj = GetObject(IISPath) Version = FindASPXScriptMapVersion(IISObj.ScriptMaps) call AddVersion(Version, mid(IISPath,5, len(IISPath)-5)) next if (ubound(Versions)> 1) then WScript.Echo vbcrlf & vbtab & _ "Warning multiple version of the .NET framework detected!" & vbcrlf for pos = lbound(Versions) to ubound(Versions)-1 WScript.echo vbtab & "Found references to " & Versions(pos) next WScript.echo "" for index = lbound(AppsInPool) to UBound(AppsInPool) IISPath = AppsInPool(index) IISPath = "IIS://localhost/" & mid(IISPath,5, len(IISPath)-5) set IISObj = GetObject(IISPath) Version = FindASPXScriptMapVersion(IISObj.ScriptMaps) WScript.echo vbtab & mid(IISPath,5, len(IISPath)-5) & _ space(70 - len(IISpath)) & " - " & Version next else for pos = lbound(Versions) to ubound(Versions)-1 WScript.echo vbtab & "Found references to " & Versions(pos) next end if end if WScript.echo "" next
I had the pleasure to present to the Christchurch .NET Users Group ( http://www.dot.net.nz ) last evening. It was a very cold night with hail, sleet, rain and we had around 25 people attend.
I spoke about three topics in my presentation:
In the talk on IIS Scripting I discussed the different providers that were available to manage IIS from a command line script or application. These include ADSI and WMI, Admin Base Objects and the new IIS 7 Managed Provider.
In the discussion about IIS diagnostic tools I presented details on the following tools from the Debug Diagnostic Toolkit for IIS.
Authentication and Access Control Diagnostics
In the IIS 7 section of the presentation I discussed some of the benefits of the new server and its new modular architecture, new UI, new extensibility, and diagnostics functionality.
I showed a number of demos of IIS 7 including a custom Basic Authentication module, a custom Directory Browsing Module, Tracing Features, Debugging a crashing application pool with Debug Diag and some features of the new User Interface.
My presentation was made on the Beta 2 build of Vista Ultimate and most of the tools worked fine on Vista and IIS 7 even though they are not designed to. As far as I know no body left early - a good sign.... IIS can be a dry topic to developers but I hope they learned something useful about the new product and of course scripting and diagnostics that they may not have known previously.
At work we came across a situation on a Windows 2003 Server IIS 6 machine where people downloading one specific file were finding that it was being terminated during the transfer. Those people who had file download managers or web browsers with resume did not notice the problem but Internet Explorer would just terminate the download.
This machine was located in the United States and users in the United States did not notice and could not reproduce the problem.
In the httperr.log file in c:\windows\system32\logfiles\HTTPERR we would find entries like the following
The reason given for the termination of the download was Timer_MinBytesPerSecond which Microsoft states as the following
The strange thing was we were getting around 30KB/S and then the download would terminate so we were getting a faster response than 240 bytes per second.
The fix to the problem was to install Service Pack 1 for Windows 2003 Server. I received a response from a Microsoft employee that stated "There are many bugs in http.sys timeout logic fixed in SP1 - one bug regarding send-size being more than 15270*MinBytesPerSecond - this was not released as a qfe, your only option is to upgrade to SP1."
Installing Service Pack 1 has indeed cured this problem....
Microsoft has released the January 2006 IIS toolkit.
This release also included some updates to SSLDiag to version 1.1. This included support for the following:
For details about each platform, please use the following URL:
IIS Guard - [Beta] Easily see all requests that are made to your IIS web server and find the sites and scripts that are causing problems
The IIS web server can easily stop working due to corrupted or poorly written web scripts. There’s no monitoring tool included in the IIS web server itself, which makes it hard, if not impossible, to find and solve problematic sites or scripts.
With IISGuard, this is a problem of the past. Now you can easily see all requests that are made to your IIS web server and find the sites and scripts that are causing problems.
These are some of the problems that IISGuard can help you find in the IIS:
There’s no need to fumble in the dark any more, IISGuard lets you find what you’re looking for in no time.
Note: This product is currently in Beta
For more details see - http://www.troxo.com/products/iisguard/
The IIS Diagnostics Toolkit is a combined release of popular tools used by today's IIS users. These tools include tools aimed at resolving problems related to Secure Socket Layer (SSL) issues, permission or security problems, gathering data for your SMTP server included with IIS, as well as the famous Log Parser utility used to sift through hundreds or thousands of log files very quickly.
Authentication and Access Control Diagnostics 1.0 (more commonly known as AuthDiag) is a tool released by Microsoft aimed at aiding IT professionals and developers at more effectively finding the source of authentication and authorization failures.
A common problem for administrators of IIS servers is configuring and troubleshooting SSL enabled websites. To assist in administrators efforts, Microsoft has designed a tool - SSL Diagnostics - to aid in quickly identifying configuration problems in the IIS metabase, certificates, or certificate stores.
The IIS 6.0 Resource Kit Tools can help you administer, secure, and manage IIS. Use them to query log files, deploy SSL certificates, employ custom site authentication, verify permissions, troubleshoot problems, migrate your server, run stress tests, and more.
I had a most interesting issue occur this morning on my work pc with IIS 5.1
I zipped up a web site I was working on last night and sent it home as an Email message. I then extracted it and worked on it at home without issues. I then used WinRAR to rar it up and sent it back to work. I then extracted the files (by drag & drop from within WINRAR) and went to run the application. I instantly received the following message in my web browser.
I did a couple of things most people do in this situation:
I then thought about requesting a static file:
I then renamed web.config to web.config1 and copied my original web.config file from the original zip over the current one!
So I renamed the web.config files around the other way so that the now working web.config was called web.config1
I then checked the permissions on the web.config files
As you can see from the above permissions there was no permissions defined for the ASP.NET machine account or the IUSR_ and IWAM_ accounts.
Now more investigating into WinRAR.
I assume that this actually extracts the file to a temp folder and then moves the file to the actual folder where it is dragged to. This causes the following scenario.
Using the Extract To option in WinRAR however correctly extracts the file to the correct folder where it inherits the security settings of the folder.
Just something you should watch out for if you see a similar issue.
Ken Schaefer [IIS MVP] has produced a very useful flow chart of how IIS 6 handles requests, this flow chart can be very useful in diagnosing 401 and 403 status codes.
For more details see Ken's site at http://www.adopenstatic.com/faq/IISRequestProcessing.aspx
Often the most effective way to diagnose the root cause of an IIS Crash or Hang situation is to use a debugging tool that allows you to look inside the various processes that IIS uses (such as dllhost.exe or w3wp.exe). Whilst diagnostic tools like AuthDiag and SSLDiag can help solve configuration issues which are preventing your IIS Server from running properly, a crash or hang usually is caused by faulty code, hardware issues, or problems connecting to remote resources (e.g. a remote database server), and these problems may not deterministically manifest themselves.
For a step by step guide to setup and using IIS State please see the following article:
The Internet Information Services (IIS) debug tools are designed to help determine which requests have caused IIS to crash and to log specific information when a request does not respond in an expected time period. This toolkit is made up of 2 main tools:
For more information see - http://www.microsoft.com/downloads/details.aspx?FamilyID=01C4F89D-CC68-42BA-98D2-0C580437EFCF&displaylang=en