在Web.config文件中获取错误

编程入门 行业动态 更新时间:2024-10-22 22:50:06
本文介绍了在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 go.microsoft/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文件中获取错误

本文发布于:2023-11-12 04:20:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580500.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   文件   Web   config

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!