我有一個超級簡單的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