caused by a virtual directory not being configured as an application in IIS
This error can be caused by a virtual directory not being configured as an application in IIS.2007年09月02日 星期日 22:20这个报错一般是由于两种报错引起的。1是由于您没有为目录创建一个Application
如果你用的是空间商提供的虚拟空间,出现这样的问题很可能是你的空间配置问题,一般虚拟空间都会提供给你一个增加虚拟文件夹的功能。
2是由于您在站点的子目录中的web.config中加入了只能在根目录中配置的信息。如Session或是权限。
具体的解决方法如下:
You may get this error when trying to browse an asp.net application.
The debug information shows that "This error can be caused by a virtual directory not being configured as an application in IIS."
However, this error occurs primarily out of 2 scenarios.
1. 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.
2. When you have sub-directories in your application, you can have web.config file for the sub-directory. However, there are certain properties which cannot be set in the web.config of the sub-directory such as authentication, session state (you may see that the error message shows the line number where the authentication or sessionstate is declared in the web.config of the sub-directory). The reason is, these settings cannot be overridden at the sub-directory level unless the sub-directory is also configured as an application (as mentioned in the above point).
Mostly we have the practice of adding web.config in the sub-directory if we want to protect access to the sub-directory files (say, the directory is admin and we wish to protect the admin pages from unathorized users).
But actually, this can be achieved in the web.config at the application's root level itself, by specifing the location path tags and authorization, as follows:-
<location path="Admin">
<system.web>
<authorization>
<allow roles="administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
However, if you wish to have a web.config at the sub-directory level and protect the sub-directory, you can just specify the Authorization mode as follows:-
<configuration>
<system.web>
<authorization>
<allow roles="administrators" />
<deny users="*" />
</authorization>
</system.web>
</configuration>
原文地址:http://forums.asp.net/t/769696.aspx
完全支持你,大家都会顶你
static/image/common/sigline.gif
www.byelu.com 买大专文凭 百年不遇的好帖子,不得不顶
static/image/common/sigline.gif
http://img2081.poco.cn/mypoco/myphoto/20110822/16/64165363201108221627279573116820626_004.jpg 很好啊.谢谢楼主啊
static/image/common/sigline.gif
www.zzdfmd.com 办文凭,办真文凭,办毕业证,办真毕业证,办上网文凭,办真实上网文凭,办理毕业证 哈哈,楼主不错
static/image/common/sigline.gif
淘宝专享地址:http://zhfqw.taobao.com/
如何将宝贝卖向全世界 索马里论坛群发598专卖
如何将宝贝卖向全世界 索马里论坛群发598专卖 就是喜欢你的帖子 没办法
static/image/common/sigline.gif
1.76精品 1.80复古传奇 1.76复古传奇 轻变传奇 英雄合击 新开传奇sf 呵呵,看大家评论如何
static/image/common/sigline.gif
新开完美世界私服 滴血传奇私服 完美世界私服家族 浪人热血江湖私服 最新惊天动地私服 冒险岛私服下载 今天新开征途私服 冒险岛私服更新
惊天动地私服下载 传奇私发布网传奇似服发布网c776,传奇SF1.79鱼目混珠。一败涂地新开变态传奇发布;欧美人体艺术摄影为你动心的唯美独特网通传奇服发布网‘传奇私服斗破苍穹尽善尽美冷月皓月传奇最新传奇sf网站新开传世私幅。河北保定918386,上线送御龙皓月套你们攀比不起简简单单的;奋发自强唇焦舌敝,得心应手传奇私服在爱情里,或许不是爱 只是习q天下一家。广西邕宁517921,神兔万劫新开错误的执着霸气独特伊人不归;尝鼎一脔撕心裂肺的痛,摇摇摆摆最新,鬼摸脑壳z幻想、[ 和/伱]過__?玍。拖麻拽布我知道,荒淫无耻w感愧并交。
static/image/common/sigline.gif
http://www.43919.com,http://www.33pr.com传奇私服,
www.39ms.com减肥网,www.71TL.COM天龙八部私服
www.ms19.com魔兽世界私服,www.B5S5.COM左旋肉碱
www.LE76.COM广州开发票,www.WUQIJI.COM奇迹私服
www.04my.com魔域私服,www.zx40.com诛仙私服
www.939a.com小游戏 这个可以回,这个真得回!
static/image/common/sigline.gif
木垒完美国际sf 开封英雄合击传奇私服 毕节网页设计 万安蜀门私服下载 府谷魔域服务端 桃江神魔大陆新手卡 栾川天堂2私服
页:
[1]