配置节“system.servicemodel'不能读,因为它缺少一个部分声明 [英] The configuration section 'system.servicemodel' cannot be read because it is missing a section declaration
问题描述
我有几分的问题。
我的老网络服务器(Windows 2003中)已被替换,以2008 R2。我被赋予了管理员帐户就可以了,可以做任何我想要的,但我在这方面没有专家。
我配置的角色有应用发展论坛和Web服务器(IIS7)。
I have somewhat of a problem. My old webserver (windows 2003) have been replaced, with a 2008 R2. I have been given an admin account on it, and can do whatever I want, but I am no expert on this area. I configured the roles to have application developement and Web server (iis7).
但我的网站运行.NET4,角色只安装3.5。
所以,我试图手动安装.NET4,在服务器上。
我的问题是,我的网站将无法在它的工作,因为我在web.config中的System.ServiceModel部分。
我已经确定它.NET4应用程序池中运行。
BUT, my website runs .NET4, and the role only installed 3.5. So I have attempted to install .NET4 manually, on the server. My problem is, my website will not work on it, due to the System.ServiceModel section in my web.config. I have made sure it runs in .NET4 application pool.
我想这是一个WCF的问题,但我不能把握该怎么解决这个问题。我曾尝试一切,我在谷歌找到。
aspnet_regis,ServiceModelReg.exe等。
我甚至已尝试重新安装Web服务器角色,但我仍然得到这个错误,每次我试图进入站点设置。
I assume this is a WCF problem, but I can't grasp how to solve it. I have tried everything I found on google. aspnet_regis, ServiceModelReg.exe and so on. I have even tried re-installing the webserver role, but I still get this error, everytime I try to enter the sites setup.
我希望这里有一些专家,谁知道如何解决这个问题。
I'm hoping there are some experts here, who know how to fix this.
推荐答案
显然IIS7需要System.WebServer部分,即使它是空的。
添加以下到我的web.config文件固定我的问题。
Apparently IIS7 needs a System.WebServer section, even if it is empty. Adding the following to my web.config file fixed my problem.
<system.webServer>
</system.webServer>
这篇关于配置节“system.servicemodel'不能读,因为它缺少一个部分声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!