问题描述
我有点问题.我的旧网络服务器(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 等.我什至尝试过重新安装网络服务器角色,但每次尝试进入站点设置时仍然出现此错误.
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",因为它缺少部分声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!