gpt4 book ai didi

asp.net - 通过 https 访问 Silverlight WCF 时出错

转载 作者:太空宇宙 更新时间:2023-11-03 13:48:51 24 4
gpt4 key购买 nike

来 self 的 silverlight 4.0 应用程序。我可以轻松访问 WCF 文件,但是当移动到 https 时,我无法访问 WCF 服务。错误详情如下:

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>

更新:

我收到了仅在 https 模式下运行服务的答复。我想在 http 和 https 两种模式下运行该服务。

对此有什么想法吗?

最佳答案

指定两个端点,一个有安全传输,一个没有。

关于asp.net - 通过 https 访问 Silverlight WCF 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6633572/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com