.net WCF ServiceModelReg.exe已删除machine.config中的system.serviceModel部分
这个问题(在经历了很多麻烦之后)现在已经解决了,所以我只是想了解我的WCF设置出了什么问题。我刚刚遇到一个问题,我运行了.net WCF ServiceModelReg.exe已删除machine.config中的system.serviceModel部分,.net,wcf,visual-studio-2010,.net-4.0,.net,Wcf,Visual Studio 2010,.net 4.0,这个问题(在经历了很多麻烦之后)现在已经解决了,所以我只是想了解我的WCF设置出了什么问题。我刚刚遇到一个问题,我运行了ServiceModelReg.exe来修复IIS7中的一些.svc处理程序映射,并开始获取HTTP 500错误和事件日志条目,如下所示: WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/33
ServiceModelReg.exe
来修复IIS7中的一些.svc
处理程序映射,并开始获取HTTP 500错误和事件日志条目,如下所示:
WebHost failed to process a request.
Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/33711845
Exception: System.ServiceModel.ServiceActivationException: The service '/newweb/Service.svc' cannot be activated due to an exception during compilation. The exception message is: Invalid element in configuration. The extension name 'enableWebScript' is not registered in the collection at system.serviceModel/extensions/behaviorExtensions. (C:\dev\AgentDesktop\ui\newweb\web.config line 174). ---> System.Configuration.ConfigurationErrorsException: Invalid element in configuration. The extension name 'enableWebScript' is not registered in the collection at system.serviceModel/extensions/behaviorExtensions. (C:\dev\AgentDesktop\ui\newweb\web.config line 174)
为了找到答案,我在谷歌上搜索了很多次,其中有很多看起来似乎是合理的,但最后我不得不在machine.config
上区分健康和不健康的机器。我惊讶地发现,我的machine.config
文件的system.serviceModel
部分被删除,尽管我运行了ServiceModelReg.exe-I
有人能解释一下这是如何或为什么被删除的吗?我只是好奇。我认为值得在这里发布的原因是,我认为这里发生的事情远远超出了人们的想象。我已经安装了VS 2010 beta 2和.NET 4 beta。我想知道.NET 2 machine.config中本应发生的任何
machine.config
更改是否实际应用于.NET 4文件?我说的对吗?这里有同样的问题,但是我的开发机器上没有出现健康的machine.config。这里有同样的问题,但是我的开发机器上没有健康的machine.config。