繁体   English   中英

无法读取配置节“ system.ServiceModel”,缺少节声明

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

我正在遵循http://docs.nuget.org/create/hosting-your-own-nuget-feeds中的文档来设置Nuget服务器。 我已经按照所有步骤操作,但是运行VS时出现上述错误。 由于错误,我缺少了一个部分,但是我缺少了哪个部分以及如何添加该部分。 我已经搜索了堆栈和谷歌,一直找不到答案。 这是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>

这可能只是您的帖子中的错字,但您的系统服务模型声明应在serviceModel上使用小写的“ s”。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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