我有一个超级简单的WCF服务。我使用IIS7将其托管在本地计算机上。添加WCF服务引用失败。和VS2008退出
当我向服务中添加服务引用时,Visual Studio告诉我存在错误。我可以单击详细信息链接,并打开一个对话框,指出:未将对象引用设置为对象的实例。
我可以构建自己的WCF服务,而且没有问题,我的客户端应用程序也可以成功构建。
我甚至可以使用svcutil http://localhost/logservice/logservice.svc?wsdl来生成客户端。
我已经看到了这个错误在我的Windows事件日志/查看器:
.NET运行库版本2.0.50727.3053 - 致命的执行引擎错误(706B7706)(80131506)
我发现了一个修补程序在网上,但不会安装...
我认为这与我添加服务引用的客户端解决方案有关。我可以使用“在解决方案中发现服务”功能添加服务refenrece。我只需要在其他地方的解决方案中添加服务参考,所以这让我感到非常紧张。
我的web.config的system.serviceModel看起来如下:
<system.serviceModel>
<services>
<service behaviorConfiguration="LogServiceBehavior" name="LogService">
<endpoint address="" binding="wsHttpBinding" contract="ILogService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="LogServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
我不明白这是如何脱离主题。 – 2013-06-25 19:03:55