Problems with IIS and ASP.NET
Published 31 January 2017
SQL Monitor is an ASP.NET application. Some default IIS installations don't enable ASP.NET.
Troubleshooting ASP.NET
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. Before you install SQL Monitor, make sure your IIS server has ASP.NET enabled.
To change ASP.NET settings, use IIS Manager.
For more information, see ASP.NET and IIS Configuration in the Microsoft documentation.
Enabling ASP.NET impersonation
IIS needs to provide a Windows identity to access protected Windows resources or files or database servers. ASP.NET also needs access to these, but by default it doesn't use the same Windows identity.
You need to configure ASP.NET to impersonate the IIS Windows identity. For instructions to do this in IIS 6, see Impersonation in ASP.NET (IIS 6) in the Microsoft documentation. For instructions to do this in IIS 7, see Configure ASP.NET Impersonation Authentication (IIS 7).
Troubleshooting IIS 7 and later
If you're using IIS with SQL Monitor 4.3 or later, SQL Monitor's application pool must be mapped to .NET 4.0. Older SQL Monitor versions require .NET 2.0.
Security settings
SQL Monitor requires the following 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 4\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\web" /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 SQL Monitor 4.3 or later, the SQL Monitor website must be mapped to ASP.NET v4.0.30319.
If you're using an earlier version of SQL Monitor, the SQL Monitor website must be mapped to ASP.NET v2.0.50727.
For more information, see Configuring SQL Monitor with IIS 6.
If SQL Monitor isn't working on your IIS 6 server, make sure:
- anonymous authentication is enabled
- wildcard mapping - Ensure you have set up wildcard mapping as described in Configuring 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 or v3.x to v4.x, you need to change the physical path to the SQL Monitor web server configured in IIS.
Change the path from:
C:\Program Files\Red Gate\SQL Monitor 2
or:
C:\Program Files\Red Gate\SQL Monitor 3
to:
C:\Program Files\Red Gate\SQL Monitor 4
For instructions, see Change the physical path of application content in the Windows documentation.