Issues with IIS and ASP.NET
Published 03 December 2012
Troubleshooting ASP.NET
Installation
If you installed ASP.NET using the Add or Remove Programs dialog or the Configure Your Server Wizard, ASP.NET should be automatically enabled in IIS. If you installed it as part of another application, downloaded it from the Web, or installed it prior to installing IIS, you must enable ASP manually. Check that your IIS server has ASP.NET enabled before installing SQL Monitor.
Use the IIS Manager (see How to Open IIS Manager) to access and enable ASP.NET settings. For more information, see ASP.NET and IIS Configuration.
Enable ASP.NET impersonation
IIS needs to provide a Windows identity in order to access protected Windows resources or certain files or database servers. ASP.NET needs access to these too, but by default it does not use the same Windows identity. You need to configure ASP.NET to impersonate the IIS Windows identity.
For details of how to do this in IIS 6, see Impersonation in ASP.NET (IIS 6).
For details of how to do this in IIS 7, see Configure ASP.NET Impersonation Authentication (IIS 7).
Troubleshooting IIS 7.5
If you're using IIS, SQL Monitor's application pool must be mapped to .NET 2.0 and not .NET 4.0.
Security settings required
SQL Monitor requires the follow security permissions to be enabled in IIS 7:
- Anonymous authentication
- Forms authentication
In IIS 7.5, security has been tightened so that w3wp.exe (the IIS application pool process) runs by default under the ApplicationPoolIdentity account. In Windows Server 2008 R2 and Windows 7 this is a Managed Service Account. Managed Service Accounts are a new concept in Win 7 / Windows 2008 R2. For more information, read the following article:
http://technet.microsoft.com/en-us/library/dd367859.aspx
The ApplicationPoolIdentity account does not necessarily have access permissions to the SQL Monitor website files that are installed by default to C:\program files\red-gate\sql Monitor 3\website. You can fix this by manually giving permissions to the SQL Monitor website folder; to do this, run the following command:
C:\>icacls "c:\program files\red-gate\sql Monitor 3\website" /grant "IIS APPPOOL\Monitor":(OI)(RX)
IIS APPPOOL\Monitor
is the Managed Service Account automatically generated for the "Monitor" application pool; the Monitor application pool is created automatically when adding a website called "Monitor".
In IIS Manager, go to the Monitor website, double click Authentication and then set Anonymous Authentication to use Application Pool Identity (i.e IIS APPPOOL\Monitor
) rather than IUSR (IUSR is the default user identity for anonymous authentication).
SQL Monitor will not work with any application pool using Classic Managed Pipeline Mode. You will need to ensure that SQL Monitor is added to an application pool running Integrated Pipeline mode.
IE error messages
By default, Internet Explorer replaces error messages with friendly versions that do not contain the details required to help diagnose problems in IIS 7. If you are receiving standard, "Internet Explorer cannot display the webpage", disable friendly HTTP error messages and enable IIS 7 detailed errors. For details of how to do this, see Troubleshooting IIS7 errors like a pro.
HTTP Error 500.19 - Internal Server Error messages
The SQL Monitor web server may display the following message (where ###
is the identifier for that specific error):
HTTP Error 500.19 - Internal Server ErrorHRESULT: 0x80070### Description of HRESULT The requested page cannot be accessed because the related configuration data for the page is invalid.
You can find possible causes and solutions for errors by checking the HRESULT
identifier against the list here: http://support.microsoft.com/kb/942055.
Troubleshooting IIS 6
If you're using IIS, SQL Monitor's application pool must be mapped to .NET 2.0, and not .NET 4.0.
If SQL Monitor is not working on your IIS 6 server, check the following:
- Anonymous authentication is enabled.
- Wildcard mapping - Ensure you have set up wildcard mapping as described in Using SQL Monitor with IIS.
- Port is different from the Default website port - Ensure that the port number specified for SQL Monitor is not the same as the number used for the Default website.
- The version of the SQL Monitor website process matches that of your Windows OS. Using the 32-bit version of ASP.NET on a system configured to support the 64-bit version may cause ASP.NET to become corrupted. Similarly, using the 64-bit version of ASP.NET on a system that is configured to support the 32-bit version would cause ASP.NET to become corrupted.
To run the SQL Monitor website as a 64 bit process on a 64 bit machine:
Run the following command on your web server:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
- Under Web extensions in IIS Manager, set the 64 bit ASP.NET Web Service extension to Allowed, and set the 32 bit ASP.NET process to Prohibited.
To run the SQL Monitor website as a 32 bit process on a 64 bit machine (not recommended):
Run the following command on your web server:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
- Under Web extensions in IIS Manager, set the 32 bit ASP.NET Web Service Extension to Allowed.
Updating the physical path in IIS for major SQL Monitor upgrades
If you've upgraded SQL Monitor from v2.x to v3.x, you'll need to change the physical path to the SQL Monitor web server configured in IIS. The path needs changing from:
C:\Program Files\Red Gate\SQL Monitor 2
to:
C:\Program Files\Red Gate\SQL Monitor 3
For details on how to do this, see Change the physical path of application content.