简体   繁体   English

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

[英]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. 我正在遵循http://docs.nuget.org/create/hosting-your-own-nuget-feeds中的文档来设置Nuget服务器。 I have followed all the steps, but when I run VS I get the error above. 我已经按照所有步骤操作,但是运行VS时出现上述错误。 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 这是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. 这可能只是您的帖子中的错字,但您的系统服务模型声明应在serviceModel上使用小写的“ s”。

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

暂无
暂无

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

相关问题 使用ConfigurationManager加载System.ServiceModel配置节 - Loading System.ServiceModel configuration section using ConfigurationManager 为WCF数据服务客户端生成System.ServiceModel配置部分 - Generating the System.ServiceModel configuration section for WCF Data Service client 如何从类库中读取“ System.ServiceModel”配置节组? - How do I read the “System.ServiceModel” configuration section group from a class library? 为什么是<system.servicemodel> app.config 中缺少部分?</system.servicemodel> - Why is the <system.serviceModel> section missing from app.config? 无法读取配置节&#39;system.web.webPages.razor&#39;,因为它缺少节声明 - The configuration section 'system.web.webPages.razor' cannot be read because it is missing a section declaration 无法读取配置节“ serviceAutoStartProviders”,因为它缺少节声明 - The configuration section 'serviceAutoStartProviders' cannot be read because it is missing a section declaration 无法读取配置节&#39;configsections&#39;,因为它缺少节声明 - The configuration section 'configsections' cannot be read because it is missing a section declaration 无法读取配置节&#39;程序集&#39;,因为它缺少节声明 - The configuration section 'assemblies' cannot be read because it is missing a section declaration 无法读取配置节&#39;entityFramework&#39;,因为它缺少节声明 - The configuration section 'entityFramework' cannot be read because it is missing a section declaration 配置部分&#39;services&#39;无法读取,因为它缺少部分声明 - the configuration section 'services' cannot be read because it is missing a section declaration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM