Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net WCF ServiceModelReg.exe已删除machine.config中的system.serviceModel部分_.net_Wcf_Visual Studio 2010_.net 4.0 - Fatal编程技术网

.net WCF ServiceModelReg.exe已删除machine.config中的system.serviceModel部分

.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

这个问题(在经历了很多麻烦之后)现在已经解决了,所以我只是想了解我的WCF设置出了什么问题。我刚刚遇到一个问题,我运行了
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。