无法读取配置部分 '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 时,我得到了上面的错误。从错误中我错过了一个部分,但是我错过了什么部分以及如何添加该部分。我搜索了 stack 和 google,但一直找不到答案。这是 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>
这可能只是您 post 中的错字,但您的系统服务模型声明应该在 serviceModel 上使用小写 "s"。
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
</system.serviceModel>
我正在按照 http://docs.nuget.org/create/hosting-your-own-nuget-feeds 中的文档设置 Nuget 服务器。我已经按照所有步骤操作,但是当我 运行 VS 时,我得到了上面的错误。从错误中我错过了一个部分,但是我错过了什么部分以及如何添加该部分。我搜索了 stack 和 google,但一直找不到答案。这是 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>
这可能只是您 post 中的错字,但您的系统服务模型声明应该在 serviceModel 上使用小写 "s"。
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
</system.serviceModel>