在Web.config文件中获取错误 [英] Getting Error in Web.config file
本文介绍了在Web.config文件中获取错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将我的网站配置为IIS,但我收到配置错误。
我也上传了同一个项目但当时没有发生任何错误。
这是我的web.config文件中的代码:
I have configured my website to IIS but I am getting Configuration Error.
I have also uploaded same project but at that time there were not occured any error.
This is code in my web.config file :
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup" />
</configSections>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="500000000" />
</webServices>
</scripting>
</system.web.extensions>
<system.webServer>
<defaultDocument>
<files>
<add value="Index.aspx" />
</files>
</defaultDocument>
</system.webServer>
<connectionStrings>
Connection String
</connectionStrings>
<system.web>
<sessionState timeout="60"></sessionState>
<trust level="Full" />
<securityPolicy>
<trustLevel name="Full" policyFile="internal" />
</securityPolicy>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<pages>
<controls>
<add src="~/UserControls/Chart.ascx" tagName="Chart" tagPrefix="MAS" />
</controls>
</pages>
</system.web>
<system.serviceModel>
<bindings />
<client />
</system.serviceModel>
</configuration>
我收到以下错误:
I am getting Following Error :
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:
Line 38: <trustLevel name="Full" policyFile="internal" />
Line 39: </securityPolicy>
Line 40: <compilation debug="true" targetFramework="4.0">
Line 41: <assemblies>
Line 42: <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
在上面的代码中显示第40行的错误...
如果剩下的话请告诉我....
请帮帮我.. 。
Displaying Error in 40th Line in above code...
If anything is remaining please tell me....
Please help me...
推荐答案
我认为你没有在IIS中正确配置应用程序。从inetmgr移动应用程序并再次使用应用程序池4.0选择托管它
Regrads,
Nirav Prabtani
I think you have not configured application in IIS correctly.Remove application from inetmgr and host it once again with selection of application pool 4.0
Regrads,
Nirav Prabtani
检查IIS的应用程序池并设置所有他们到4.0 [.NET Framework版本] ...
check your Application Pools of IIS and set all of them to 4.0 [.NET Framework Version]...
首先从iis和inetpub中删除应用程序然后运行Aspnet regiis工具。然后再次将您的应用程序添加到inetpub,并设置应用程序池到4.0经典。
First remove the application from iis and inetpub then Run the Aspnet regiis tool .Then again add your application to inetpub,and set application pool to 4.0 classic .
这篇关于在Web.config文件中获取错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文