我正在尝试发布Web服务,但收到错误消息:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
我有以下详细信息:
Module DefaultDocumentModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x800700b7
Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'KWebService.asmx'
Config File \\?\C:\inetpub\wwwroot\KWebService\web.config
Requested URL http://localhost:80/KWebService/KWebService
Physical Path C:\inetpub\wwwroot\KWebService
Logon Method Anonymous
Logon User Anonymous
指向行:
13: <files>
14: <add value="KWebService.asmx" />
15: </files>
我已经将KWebService文件夹保存在路径C:\inetpub\wwwroot\KWebService中,我的web.config是:
<?xml version="1.0" encoding="utf-8"?>
<!--
Pour plus d'informations sur la configuration de votre application ASP.NET, consultez
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime targetFramework="4.0" />
</system.web>
<system.webServer>
<defaultDocument>
<files>
<add value="KWebService.asmx" />
</files>
</defaultDocument>
<directoryBrowse enabled="true" />
</system.webServer>
</configuration>
我的IIS管理器有以下屏幕截图:
我使用的端口号是80,targetFramework=“4.0”,在应用程序池中,我有以下版本的快照:
谁能告诉我问题的原因?
2条答案
按热度按时间dl5txlt91#
出现此错误是因为您在更高级别的配置文件中有类似的条目。它可能在服务器或网站级别。请尝试将以下内容放在
web.config
文件中的标记下方。<remove name="KWebService.asmx" />
如果你不想放置上面的条目,那么你也可以尝试在更高级别的配置文件中找到重复的条目,比如
applicationhost.config
,如果不需要的话,可以从那里删除它。7ivaypg92#
HTTP 500.19 -内部服务器错误x1c 0d1x
必须检查“CLR .NET版本”或“.NET版本”中是否存在版本