ASP.NET Runtime Errors Occuring in web.config file for .aspx framework 2.0 website

两盒软妹~` 提交于 2020-01-05 05:44:07

问题


I am receiving this error when I ftp my .aspx web page to a remote server hosted by Network Solutions. This code is in my web.config file and when I remove the tag I get another error about the targetFramework = 4.5 attribute not being recognized. This first error recommends that I set up a virtual directory using IIS, but I cannot access IIS Manager with my subscription to the remote server. Is There any workaround to solving this authentication mode tag error and even the unrecognized targetFramework attribute error without using IIS or is there any solution at all? Please help, and one last thing is that the web page is targeting the 2.0 framework, but the whole targetFramework = 4.5 thing is still there even though 4.5 has nothing to do with the web site and that tag and attribute is not even in my web.config file, which I find strange. What steps should I take to fix the issue. I'll once again note that I don't have access to IIS Manager because of my hosting subscription. This is all being used under Windows Servers 2003.

Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

        ASP.NET to identify an incoming user. 
     -->
     <authentication mode="Windows" />
     <!--
         The <customErrors> section enables configuration 

Version Information: Microsoft .NET Framework Version:2.0.50727.3649; ASP.NET Version:2.0.50727.3634

Second issue that shows up:

Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Source Error:

 <system.web>
   <compilation debug="false" targetFramework="4.5" />
   <httpRuntime targetFramework="4.5" />
 </system.web>

Version Information: Microsoft .NET Framework Version:2.0.50727.3649; ASP.NET Version:2.0.50727.3634


回答1:


Looks like your web app works on App Pool with .NET Framework 2.0, but wants to use .NET 4.5. Check application pool config for your web application



来源:https://stackoverflow.com/questions/20088824/asp-net-runtime-errors-occuring-in-web-config-file-for-aspx-framework-2-0-websi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!