在编译ASP.NET网站的MSBuild错误 [英] MSBuild error while compiling ASP.NET website

查看:114
本文介绍了在编译ASP.NET网站的MSBuild错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误,当我尝试使用自定义生成脚本来编译一个asp.net网站。

I get the following error when I try to compile an asp.net site using a custom build script.

error ASPCONFIG: 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.

虽然说明详细,我不明白它的意思完全一样。我还没有配置IIS来承载这个网站,我不认为我可以为我的计算机运行Vista家庭基本版。因此网站无法使用自定义脚本建?请回复,因为我想测试此功能。

Although the description is in detail I do not understand what it means exactly. I have not configured IIS to host this website and I don't think I will be able to as I am running Vista Home Basic version. So the website cannot be built using custom scripts?Please reply as I want to test this feature.

推荐答案

有可能是你的web.config文件放在一个目录,是不是该应用程序的根。在IIS的大多数版本,可以将任何文件夹转换上你的网站应用程序根目录:

It is likely that your web.config file is placed in a directory that is not the root of the application. On most versions of IIS, you can convert any folder on your web site to an application root:


  1. 开启IIS并导航到相应的文件夹

  2. 右键单击该文件夹,选择属性

  3. 在应用程序设置和应用程序名称旁边,点击创建

  4. 应用并关闭

如果这不解决您的问题,有可能是另一种配置错误,无论是与IIS或您的应用程序。

If this does not fix your problem, there may be another configuration error, either with IIS or your application.

这篇关于在编译ASP.NET网站的MSBuild错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆