"500 is an internal server error." in IIS 4.0 application

I made a simple asp.net web application that does nothing. It works using .net framework 2.0 (like all other applications on the server), but when I change it to .net framework 4.0, I get "500 - internal server error".

To upgrade to 4.0, I compiled with .Net Framework 4.5.2 (also tried 4.0), and I changed the application pool in IIS to integrated ASP 4.0.

I installed web.config to display errors, but this is still just the vague error message above. I do not see errors or warnings in the system logs. I registered .net framework v4.0.30319.

What can cause this?

web.config:

<?xml version="1.0"?> <configuration> <system.web> <compilation strict="false" explicit="true" targetFramework="4.5.2"/> <httpRuntime targetFramework="4.5.2"/> <customErrors mode="Off"> <error statusCode="403" redirect="NoAccess.htm"/> <error statusCode="404" redirect="FileNotFound.htm"/> </customErrors> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> </system.web> </configuration> 
+5
source share
2 answers

I assume that you did not register the installation of .NET 4.0 correctly . you need to run in cmd with the following parameters "C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i"

Installation steps for this command

1. Now you need to run the command line by typing cmd in the "Run" command, and then run the command line with administrator privileges, right-click and select "Run as administrator" in the context menu.

2. Then, on the command line, you need to go to the directory where the aspnet_regiis.exe file aspnet_regiis.exe , for which you need to enter the text CD C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ And then you need to enter the following command and press enter to register ASP.Net with IIS. aspnet_regiis -i

+2
source

Turn on and view the detailed errors of your web posts in which you may find the real problem. If you can launch the browser on the server, you will receive detailed information about the error, because the server will know that you are local and show it to you. View events as well as details about your error. Try with debug = "true" .

 <configuration> <system.webServer> <httpErrors errorMode="Detailed" /> <asp scriptErrorSentToBrowser="true"/> </system.webServer> <system.web> <customErrors mode="Off"/> <compilation debug="true"/> </system.web> </configuration> 
+2
source

All Articles