• SQL2005 2008配置错误,无法识别的配置节 system.serviceModel machine.config配置文件有问题


    当装上2008的时候,你以前的程序突然报出你的machine.config配置文件有问题,比如

    “/” 应用程序中的服务器错误。


    配置错误

    说明 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 
    分析器错误消息 无法识别的配置节 system.serviceModel 。 
    源错误 :

     

    行 135:        </roleManager>

    行 136: </system.web>

    行 137: <system.serviceModel>

    行 138:        <extensions>

    行 139:                <behaviorExtensions>

    源文件 C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Config

    /machine.config    行 137


    版本信息  Microsoft .NET Framework 版本 :2.0.50727.3053; ASP.NET 版本 :2.0.50727.3053

    出现这个错误可能是机器重启的时候,配置文件中.NETFRAMEWORK3.0部分的控制运行配置并没有加进去,所以造成配置文件出错,这是只需要添加配置就可以了

            <sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="comContracts" type="System.ServiceModel.Configuration.ComContractsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
                <section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="machineSettings" type="System.ServiceModel.Configuration.MachineSettingsSection, SMDiagnostics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
                <section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            </sectionGroup>
            <sectionGroup name="system.serviceModel.activation" type="System.ServiceModel.Activation.Configuration.ServiceModelActivationSectionGroup, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <section name="diagnostics" type="System.ServiceModel.Activation.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="net.pipe" type="System.ServiceModel.Activation.Configuration.NetPipeSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="net.tcp" type="System.ServiceModel.Activation.Configuration.NetTcpSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            </sectionGroup>

    把它加载configSections之间就可以了!

  • 相关阅读:
    Hadoop集群搭建记录 | 云计算[CentOS7] | 伪分布式集群 Java环境配置(Oracle JDK)
    [leetcode] 2049 统计最高分的节点数目 | dfs二叉树
    [Linux] 输入命令ls laF后的各字段含义解析
    [leetcode] 432. 全 O(1) 的数据结构 | STL 双向链表&哈希
    Hadoop集群搭建记录 | 云计算[CentOS7] | 伪分布式集群 Hadoop安装配置
    [leetcode] 2024. 考试的最大困扰度 | 双指针
    Hadoop集群搭建记录 | 云计算[CentOS7] | 伪分布式集群[主机名与ip映射+修改配置文件]
    [leetcode] 2039. 网络空闲的时刻 | BFS
    []Linux中rpm命令详解
    Hadoop集群搭建记录 | 云计算[CentOS7] | Eclipse安装并创建第一个项目
  • 原文地址:https://www.cnblogs.com/chenmfly/p/4325880.html
Copyright © 2020-2023  润新知