sql server2008 装上后,总是出现machine.config line136,或者 出现 配置错误 无法识别的配置节 system.serviceModel 。

 

怀疑问题是vs 和 sql server2008安装冲突的问题造成,

 

有一个这样的说法:

用win8.1的64位 的系统,如果先装vs2010,再装sql server 2008 r2,根本就不行,一开始就报错。

   于是先安装sql server 2008 r2成功,再安装VS2010/2013也成功,之后sql server managememt stiduo就打不开了!

 

报错的是.NETFramework,说是应用程序的组件中发生处理的异常,详情里面一堆异常文本,点击继续!终于弹出连接窗口!试图连接,错误信息提示又出现了

  看到它弹出的提示信息,从中知道配置系统未能初始化,无法识别配置节点(system.Configuration),(C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config,line136),看来问题就出在这里了。

    查网上,也没有好的解决方案,要么语焉不详。我采取的方法是

1)先装SQLServer2008R2,装好後,备份文件C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config

2)装vs2010/2013,装好後恢复备份的文件,新文件弃之不用。

    采用这种方法,SQLSERVER2008R2和vs2010/2013运行都很正常。

 

 

不过可以不用重新安装,可以用这种方法解决:

<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> 

  

把它添加到C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Config/machine.config文件中的configSections之间就可以了。

http://blog.csdn.net/zdw_wym/article/details/40892535

 

可以看看这个贴吧描述

http://tieba.baidu.com/p/3556607480

posted on 2016-08-12 18:25  aji2014  阅读(311)  评论(0编辑  收藏  举报