When IIS serves HTML files perfectly but chokes on ASPX files without logging errors, you're facing one of the most frustrating ASP.NET integration issues. Here's a deep dive into solving this silent killer.
- Handler Mappings: Run
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -lv
to verify the correct ASP.NET version is registered - Application Pool Identity: Ensure it's using the correct .NET CLR version (2.0 for this case)
- ISAPI Filters: Check if ASP.NET filter appears in IIS Manager with correct path to aspnet_filter.dll
// Sample web.config that could cause silent failures
<configuration>
<system.web>
<compilation debug="false">
<assemblies>
<!-- Missing assembly references here -->
</assemblies>
</compilation>
</system.web>
</configuration>
Enable failed request tracing in IIS:
- Open IIS Manager
- Select the server node
- Double-click "Failed Request Tracing Rules"
- Create a rule for *.aspx files with status codes 200-999
When everything else fails, this sequence often works:
aspnet_regiis.exe -u
aspnet_regiis.exe -i
iisreset /noforce
For a test.aspx containing just:
<%@ Page Language="C#" %>
<html>
<body>
<% Response.Write("Test"); %>
</body>
</html>
If this fails, check NTFS permissions for both IUSR_[MachineName]
and NETWORK SERVICE
on:
- C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
- The physical directory containing your ASPX file
Recently encountered a puzzling scenario where IIS on Windows Server 2003 serves HTML files perfectly but completely fails to process any ASP.NET content. The symptom manifests as:
http://localhost/Test/Default.htm → Works
http://localhost/Test/Default.aspx → Silent failure (no response, no logs)
After exhausting standard troubleshooting steps, we need to examine several critical areas:
- ASP.NET Handler Mapping configuration
- ISAPI filter registration
- Worker process identity permissions
- Metabase compatibility issues
Here's the complete diagnostic procedure I followed:
1. Verify IIS and ASP.NET features in Server Manager:
- Start → Administrative Tools → Server Manager
- Check both "Web Server (IIS)" and "ASP.NET" roles
2. Confirm Web Service Extensions:
- IIS Manager → Web Service Extensions
- Ensure "ASP.NET v1.1" and "ASP.NET v2.0" are set to Allowed
3. Re-register ASP.NET:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -U
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
The key resolution involved a complete reinstallation sequence:
- Uninstall .NET Framework 2.0 via Add/Remove Programs
- Remove all ASP.NET entries from IIS using
aspnet_regiis -u
- Reinstall .NET Framework 2.0 with SP2
- Reregister with
aspnet_regiis -i
- Reset IIS (
iisreset
)
To avoid recurrence, implement these best practices:
// Sample web.config for explicit handler mapping
<configuration>
<system.webServer>
<handlers>
<add name="ASP.NET"
path="*.aspx"
verb="*"
type="System.Web.UI.PageHandlerFactory"
resourceType="Unspecified" />
</handlers>
</system.webServer>
</configuration>
Additionally, consider these registry checks:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET]
"VerificationCompatibility"=dword:00000001