<!-- Web.Config Configuration File --> 
<configuration> 
<system.web> 
<customErrors mode="Off"/> 
</system.web> 
</configuration> 
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --> 
<configuration> 
<system.web> 
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> 
</system.web> 
</configuration> 
真实原因:.net装了以后,没有正常注册到iis 
解决办法: 
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i 
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i