在發佈Silverlight項目時嘗試訪問服務http://griduni.uninova.pt/sidac/Service/SilverlightWCF.svc獲取apears的錯誤消息。WCF Web服務錯誤:類型爲「ExampleTeste45.Web.Service.SilverlightWCF」,提供爲
我的web.config
<configuration>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5">
</compilation>
<httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
<!--<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://griduni.uninova.pt"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>-->
<!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />-->
<bindings>
<customBinding>
<binding name="ExampleTeste45.Web.Service.SilverlightWCF.customBinding0">
<binaryMessageEncoding />
<httpTransport />
</binding>
</customBinding>
</bindings>
<!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />-->
<services>
<service name="ExampleTeste45.Web.Service.SilverlightWCF"
behaviorConfiguration="SimpleServiceBehavior">
<endpoint address="" binding="customBinding"
bindingConfiguration="ExampleTeste45.Web.Service.SilverlightWCF.customBinding0"
contract="ExampleTeste45.Web.Service.SilverlightWCF" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="SimpleServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />-->
</system.serviceModel>
</configuration>
我的服務標記:
<%@ ServiceHost Language="C#" Debug="true" Service="ExampleTeste45.Web.Service.SilverlightWCF" CodeBehind="SilverlightWCF.svc.cs" %>
,我看到由谷歌的解決方案,沒有工作,服務= Markup中的「ExampleTeste45.Web.Service.SilverlightWCF」根據定義糾正端點地址空白,我看到它獲得正確的地址,那麼我做錯了什麼?
另外我想知道爲什麼你有評論
2014-09-11 12:12:36
它給出了另一個錯誤,所以評論,看看是否解決問題,並由於消除了顯示和建立的錯誤解決方案沒有給我錯誤,我讓它留下 – 2014-09-11 12:27:37