简体   繁体   中英

The configuration section 'system.ServiceModel' cannot be read, missing section declaration

I am following the documentation from http://docs.nuget.org/create/hosting-your-own-nuget-feeds to set up a Nuget Server. I have followed all the steps, but when I run VS I get the error above. From the error I am missing a section, but what section am I missing and how do I add that section. I have searched stack and google and have been unable to find an answer. Here is the code for the web.config

?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
    <system.web>
      <compilation debug="true" targetFramework="4.5.2"/>
      <httpRuntime targetFramework="4.5.2"/>
    </system.web>
  <appSettings>
    <add key ="packagePath" value="E:\HostedNugetServer"/>
    </appSettings>
  <system.ServiceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
    </system.ServiceModel>
</configuration>

This may be just a typo in your post, but your system Service Model declaration should be with a lower-case "s" on the serviceModel.

<system.serviceModel>
     <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
</system.serviceModel>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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