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


We already created an webservice in Visual Studio 2013 with .Net 4.5. This webservice runs well local in the same computer.

Right now we want to export this webservice to an Windows Server 2008 with IIS. We already made an webservice running in port 8080.

But when we copy the exported files to the root directory of this webserver the folowwing error occured:

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 

IIS Web Core 


Not yet determined 

Error Code

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

Config File

Requested URL

Physical Path

Logon Method
Not yet determined 

Logon User
Not yet determined 

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

The webconfig we exported in Visual studio is:

<?xml version="1.0"?>

    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
    <compilation targetFramework="4.5" />
    <httpRuntime targetFramework="4.5"/>
        <binding name="RightNowSyncBinding">
            <security defaultAlgorithmSuite="Default" authenticationMode="UserNameOverTransport"
            requireDerivedKeys="true" securityHeaderLayout="Lax" includeTimestamp="false">
            <localClientSettings detectReplays="false" />
            <localServiceSettings detectReplays="false" />
          <textMessageEncoding messageVersion="Soap12" />
          <httpsTransport />
      <endpoint address=""
        binding="customBinding" bindingConfiguration="RightNowSyncBinding"
        contract="RightNowServiceReference.RightNowSyncPort" name="RightNowSyncPort" />
          <!-- 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"/>
      <service name="Yor24Service.Service">
        <endpoint address="" contract="Yor24Service.IService" binding="basicHttpBinding"/>
        <endpoint address="mex" contract="IMetadataExchange" binding="mexHttpBinding"/>
        <add binding="basicHttpBinding" scheme="http" />
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <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"/>


What is the problem with this generated config file?

asked on Stack Overflow Jan 16, 2014 by JelleP • edited Dec 3, 2014 by davmos

2 Answers


Starting with .Net Framework 4 service behaviors do not require a name (MSDN). Before .Net 4 it was mandatory. Because your service behavior does not have a name:

        <!-- name attribute missing in behavior -->

and IIS is throwing an error I suspect your app pool is not running .Net 4 or newer.

answered on Stack Overflow Jan 16, 2014 by venerik • edited Dec 3, 2014 by davmos

Try this link, solution 3 work with me

Solution 3: Run attached javascript file
The above solutions do not fix the Issue 3. So I created a javascript FixServiceModel30Reg.js to fix the problem. You can run it as following to fix all of the above issues. Steps:
·        Download the script FixServiceModel30Reg.txt and save it to the root of c: drive.
·        Rename it to FixServiceModel30Reg.js.
·        Open the Command Prompt window and run the following command:
Cscript.exe c:\FixServiceModel30Reg.js
answered on Stack Overflow Oct 14, 2015 by Grey Wolf • edited Oct 15, 2015 by Grey Wolf

User contributions licensed under CC BY-SA 3.0