HTTP Error 500.21 and http Error 500.21
When the analyzer error message is resolved: the unrecognized attribute "targetFramework ". Note that the attribute names are case sensitive. After the problem occurs, another IIS problem occurs, as shown below:
The Server Error in the application "EXPORTEXCEL" Internet Information Services 7.5 Error summary HTTP Error 500.21-Internal Server Error handler "PageHandlerFactory-Integrated" contains an Error module "ManagedPipelineHandler" in its module list error message module IIS Web Core notifies ExecuteRequestHandler handler PageHandlerFactory-Integrated Error Code 0x8007000d request URL http: // 192.168.0.100: 80/ExportExcel. aspx physical path F: \ Project \ ExportExcel. the most possible reason for the aspx logon method to anonymous users is that the managed handler is used. But ASP. NET is not installed or is not fully installed. An error occurred while configuring the handler module list. Operations that can be attempted: If you want to use a hosted handler, install ASP. NET. Ensure that the handler Module name is specified correctly. The module name is case sensitive and in the format of statles = "StaticFileModule, defadocumentdocumentmodule, and DirectoryListingModule. The IIS kernel does not recognize this module. View More information»
Because Visual Studio is reinstalled, Visual Studio is installed first, and IIS is installed again, you need to register IIS in the local asp.net
Solution:
1. Find the local Framework address, which contains aspnet_regiis.exe
2. Open the Run window (win + r), Enter cmd, press enter, open the console, copy the local path of the Framework, right-click and paste
(Input the CD before pasting, and use it to paste to the definition directory. Then enter aspnet_regiis.exe-I and press Enter.
The following prompt indicates that the registration is successful. The project can be opened successfully.
(-I is a parameter. You can directly enter aspnet_regiis.exe and press enter to view the parameter information)