La section de configuration du système".serviceModel' ne peut pas être lu en raison de l'absence d'une déclaration de la section

Nous avons déjà créé un webservice dans Visual Studio 2013 avec .Net 4.5. Ce service web fonctionne bien en local sur le même ordinateur.

Droit maintenant, nous voulons exporter ce webservice pour un Windows Server 2008 avec IIS. Nous avons déjà fait un webservice cours d'exécution dans le port 8080.

Mais quand on copie les fichiers exportés vers le répertoire racine de ce serveur le folowwing erreur s'est produite:

Error Summary 
HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.


Detailed Error Information 


Module
IIS Web Core 

Notification
Unknown 

Handler
Not yet determined 

Error Code
0x80070032 

Config Error
The configuration section 'system.serviceModel' cannot be read because it is missing a section declaration  

Config File
\\?\C:\inetpub\wwwroot\YOR24Websevices\web.config 

Requested URL
http://localhost:8080/

Physical Path


Logon Method
Not yet determined 

Logon User
Not yet determined 


Config Source    10:   </system.web>
   11:   <system.serviceModel>
   12:     <bindings>

Le webconfig, nous avons exporté dans Visual studio:

<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation targetFramework="4.5" />
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="RightNowSyncBinding">
<security defaultAlgorithmSuite="Default" authenticationMode="UserNameOverTransport"
requireDerivedKeys="true" securityHeaderLayout="Lax" includeTimestamp="false">
<localClientSettings detectReplays="false" />
<localServiceSettings detectReplays="false" />
</security>
<textMessageEncoding messageVersion="Soap12" />
<httpsTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="https://tkbc-fleetsupport--tst.custhelp.com/cgi-bin/tkbc-fleetsupport--tst.cfg/services/soap"
binding="customBinding" bindingConfiguration="RightNowSyncBinding"
contract="RightNowServiceReference.RightNowSyncPort" name="RightNowSyncPort" />
</client>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Yor24Service.Service">
<endpoint address="" contract="Yor24Service.IService" binding="basicHttpBinding"/>
<endpoint address="mex" contract="IMetadataExchange" binding="mexHttpBinding"/>
</service>
</services>
<protocolMapping>
<add binding="basicHttpBinding" scheme="http" />
</protocolMapping>    
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>

Quel est le problème avec cette généré fichier de config?

InformationsquelleAutor JelleP | 2014-01-16