【发布时间】:2012-10-08 08:41:07
【问题描述】:
在我的 Asp.Net MVC 4 项目中,我已在 .csproj 文件中设置以构建视图 <MvcBuildViews>true</MvcBuildViews>。问题是构建项目我得到了错误:
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.
我试图删除 obj 文件夹,但错误不断出现。错误表明问题出在身份验证标记行中:
<system.web>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" />
</authentication>
通常,我可以通过运行应用程序(我收到错误)、构建应用程序然后再次运行来运行应用程序。
【问题讨论】:
标签: asp.net-mvc msbuild visual-studio-2012