I am trying to publish a webservice and i am getting error which says :
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
I have the following details:
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
which points to line:
   13:             <files>
   14:                 <add value="KWebService.asmx" />
   15:             </files>
I have saved the the KWebService folder at path C:\inetpub\wwwroot\KWebService. and my web.config is :
<?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>
My IIS manager has this screenshot:

My port number used is 80 and targetFramework="4.0" and in application pool i have this snapshot of version:

Could some one please let me know the cause of problem?
Erreur HTTP 500.19 - Internal Server Error 

You have to check if there is a version in ""Version du CLR .NET"" or ".NET Version"
User contributions licensed under CC BY-SA 3.0