It is an error to use a section registered as allowDefinition='MachineToApplica

chensheng021 2012-03-22 02:21:42
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.


我在学习asp.net时出现这个问题。我运行一个例子时报错,但是我重新建立一个网站,然后把代码copy过去后却能运行。

网上查:
When you create an new web application using visual studio.net, it automatically creates the virtual directory and configures it as an application. However, if you manually create the virtual directory and it is not configured as an application, then you will not be able to browse the application and may get the above error. The debug information you get as mentioned above, is applicable to this scenario.

解决方法:
To resolve it, Right Click on the virtual directory - select properties and then click on
"Create" next to the "Application" Label and the textbox. It will automatically create the "application" using the virtual directory's name. Now the application can be accessed.


这个Create虚拟目录是在哪里设置????

谢谢!!!
...全文
335 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
chensheng021 2012-03-22
  • 打赏
  • 举报
回复
求大侠帮忙。。。。。。。。。。。。

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧