简体   繁体   English

将IIS7.5网站作为应用程序时-应用程序“默认网站”中的服务器错误?

[英]when Make IIS7.5 Web Site an Application - Server Error in Application “DEFAULT WEB SITE”?

HTTP Error 500.19 - Internal Server Error HTTP错误500.19-内部服务器错误

The requested page cannot be accessed because the related configuration data for the page is invalid. 无法访问请求的页面,因为该页面的相关配置数据无效。

Detailed Error Information 详细错误信息
Module DefaultDocumentModule 模块DefaultDocumentModule
Notification ExecuteRequestHandler 通知ExecuteRequestHandler
Handler StaticFile Error 处理程序StaticFile错误
Code 0x800700b7 代码0x800700b7
Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'Default.aspx' Config File \\?\\C:\\inetpub\\wwwroot\\web.config Requested URL http://localhost:80/testiis/ Physical Path D:\\Work\\Development\\Tutorials\\TestIIS\\ Logon Method Anonymous Logon User Anonymous 配置错误无法添加类型为“添加”的重复集合条目,且其唯一键属性“值”设置为“ Default.aspx”。配置文件\\?\\ C:\\ inetpub \\ wwwroot \\ web.config请求的URL http:// localhost:80 / testiis /物理路径D:\\ Work \\ Development \\ Tutorials \\ TestIIS \\登录方法匿名登录用户匿名

Config Source 配置源

<files>
   <add value="Default.aspx" />
</files>

It looks like you are marking the same Site (Default Web Site) as also an application called /testiis/. 看起来您正在标记与一个名为/ testiis /的应用程序相同的站点(默认网站)。 You should know that the Site in itself is an application "/" also called Root, and what is happening is that you are creating a "nested application" pointing to the same directory, causing essentially everything inside the web.config (\\inetpub\\wwwroot) to be duplicated since the inheritance is based on virtual namespace, in other words IIS merges the configuration files at: 您应该知道站点本身就是一个应用程序“ /”,也称为Root,并且正在发生的事情是您正在创建指向同一目录的“嵌套应用程序”,从而导致web.config(\\ inetpub \\由于继承基于虚拟名称空间,因此将被复制,即IIS在以下位置合并配置文件:
"/web.config" “ /web.config”
and
"/testiis/web.config" “ /testiis/web.config”

which are the same file causing this duplicate problem. 是导致此重复问题的同一文件。 What you should do instead is create a folder called Testiis under \\inetpub\\wwwroot\\ and edit your application to point to that directory instead. 相反,您应该做的是在\\ inetpub \\ wwwroot \\下创建一个名为Testiis的文件夹,然后编辑您的应用程序以指向该目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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