简体   繁体   中英

Error allowDefinition='MachineToApplication' beyond application level in asp.net

recently while working on asp.net application, i got below error:

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.

i am sure the previous day it was working absolutely fine, however i guess this error occurs usually because of multiple web.config files, but i checked in my project, whole project contains single web.config files, can anyone please tell me what could be the reason for this error.

As the error suggests, You need to set up the directory you've placed the website in as a web application within IIS.

在此处输入图片说明

谢谢Nawaaz,我得到了解决方案,实际上是因为i was opening website (using file-->open-->website) and not the solution file-> open- i was opening website (using file-->open-->website) and not the solution ,所以我打开了解决方案并清理了解决方案并进行构建,并且可以正常工作,非常感谢您抽出宝贵的时间回复。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM