[英]Wcf service not running
當我通過選擇(Solution Explorer-> Add new folder-> gave name,然后在該文件夾上,我選擇添加新項目-> wcf service-> name-> ok)將新的wcf服務添加到現有應用程序時:a接口和實現類。 在我嘗試運行wcf服務時做了一些邏輯后,它得到了錯誤。
更改(添加)了我的web.config,如下所示:折疊| 復制代碼(用於第一項服務)
<service name="Intranet.WCF_Service.CGI_Automated" behaviorConfiguration="Intranet.WCF_Service.CGI_AutomatedBehavior">
<endpoint address="../WCF Service/CGI_Automated.svc" binding="webHttpBinding" contract="Intranet.WCF_Service.ICGI_Automated" behaviorConfiguration="webBehaviour" />
<endpoint name="mexHttpBinding" address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service> (for 2nd one)
</services>
收合| 復制代碼
<behavior name="Intranet.WCF_Service.CGI_AutomatedBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="Serviceforcgi.Service1Behavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
請對此提出建議,我在這里感到困惑。
確保遵循app.config文件結構 。 無需使用不同的名稱給出相同的行為。 檢查端點地址,它不應包含空格。
使用WCF配置編輯器 (可在工具中使用)來實現簡單的服務/端點/行為/等。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.