[英]IIS hosting WCF service error
我正在使用IIS 7.0承載簡單的WCF服務。 我是使用VSTS 2008 + .Net 3.5 + C#編寫的。 問題是當我訪問http:// localhost:9999 / service.svc時 (我想在Web瀏覽器中我們可以瀏覽WSDL的內容,並且我創建一個使用端口9999的新網站並以管理員帳戶運行應用程序池) ,我遇到以下錯誤,有什么主意嗎?
http://i27.tinypic.com/a9r8cz.jpg
這是我的service.svc:
<%@ ServiceHost Language="C#" Service="Gu.WCF.StudentManagement" %>
這是我的web.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="Gu.WCF.ServiceBehavior"
name="Gu.WCF.StudentManagement">
<endpoint address="" binding="basicHttpBinding" contract="Gu.WCF.IStudentManagement">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Gu.WCF.ServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
請確保您已將.svc擴展名映射到ISAPI處理程序。
聽起來像.NET 3.0 ISAPI映射消失了。 在.NET 3.0 WCF目錄(C:\\ Windows \\ Microsoft.NET \\ Framework \\ v3.0 \\ Windows Communication Foundation)中運行ServiceModelReg -r
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.