來自我的silverlight 4.0應用程序。我可以輕鬆地訪問WCF文件,但是當移動到https時,我無法訪問WCF服務。錯誤細節如下:Silverlight WCF通過https訪問的錯誤
An unknown error occurred. Please contact your system Administrator for more information.
An exception occurred during the operation, making the result invalid. Check InnerException for exception details.
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at FileSearch.SearchServices.GetTypeofFileDetailedCompletedEventArgs.get_Result()
at FileSearch.Home.<SearchButton_Click>b__0(Object s, GetTypeofFileDetailedCompletedEventArgs ea)
at FileSearch.SearchServices.SearchServiceClient.OnGetTypeofFileDetailedCompleted(Object state)
我已經看到了關於這個問題不同的崗位,但沒有指向我在一個正確的方向。
下面是關於承載Silverlight應用程序以及WCF服務的Web應用程序的web.config文件的詳細信息。
<services>
<service name="FileSearch.Web.Services.SearchService">
<endpoint address="" binding="customBinding" bindingConfiguration="FileSearch.Web.Services.SearchService.customBinding0" contract="FileSearch.Web.Services.SearchService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
這裏是servicerefernce.clientconfig文件:
<configuration>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="CustomBinding_SearchService">
<binaryMessageEncoding />
<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="../Services/SearchService.svc"
binding="customBinding" bindingConfiguration="CustomBinding_SearchService"
contract="SearchServices.SearchService" name="CustomBinding_SearchService" />
</client>
</system.serviceModel>
</configuration>
UPDATE:
我收到的答案運行僅在HTTPS模式的業務。我想在http和https模式下運行該服務。
有關於此的任何想法?
您可以發佈您嘗試在服務中調用的操作的代碼嗎?這聽起來像是該操作中有一個例外。 – Tim
但它在'http'上正常工作。問題出在'https' –
你的配置文件中沒有任何安全設置 - 這可能是問題的一部分? – Tim