English 中文(简体)
asp.net web配置错误
原标题:asp.net web-config error

我对asp.net项目仍然有问题。在Visual studio中,当我开始调试时,一切都很好,页面也能正常工作,但当我在iis7上尝试时,会显示此错误。

显示错误:

配置错误描述:处理服务此请求所需的配置文件时出错。请查看下面的具体错误详细信息,并适当修改您的配置文件。

分析器错误消息:无法识别的属性targetframework。请注意,属性名称区分大小写。

源错误:

Line 18:     </connectionStrings> 
Line 19:     <system.web> 
Line 20:       <compilation debug="true" targetframework="4.0" /> 
Line 21:     </system.web> Line 22: 

源文件:C:\inetpubwwwrootweb.config行:20

targetFramework似乎有问题,但我不知道是否必须在我的web配置中配置iis服务器或其他什么。

thx。

最佳回答

Change the .NET version on the Application pool for your website. It must be .NET 4.0, not the .NET 2.0 View a List of Application Pools (IIS 7)

问题回答

确保应用程序池设置为使用.NET 4.0。

将应用程序池更改为与.NET 4.0兼容。

打开IIS,然后单击列表中的应用程序池,并将其修改为使用.NET Framework 4.0。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签