我正在按照書中的教程來實現Windows Phone的推送通知。這是服務的標記:未找到WCF端點
<%@ ServiceHost Language="C#" Debug="true" Service="Service.PushService" CodeBehind="PushService.svc.cs" Factory="System.ServiceModel.Activation.WebServiceHostFactory" %>
正如你看到的,一個工廠增加,但我真的不明白它是。運行服務時,出現"endpoint not found"
錯誤。當我從標記中移除工廠時,錯誤消失,但我得到一個空白頁面。
任何想法可能會導致此錯誤或如何解決它?如果你需要更多的代碼,請告訴我。
感謝
編輯: 我的web.config:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="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>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
請發表您的config文件 – Jocke 2013-02-28 09:15:36
閱讀本http://msdn.microsoft.com/en-us/library/aa702697.aspx – Jocke 2013-02-28 09:18:07
我已經添加了.config文件,謝謝.. – Bv202 2013-02-28 09:20:46