从Silverlight通过https使用WCF服务
我正在尝试以下示例代码: 看起来一切正常,但当它尝试从WCF调用异步方法时,会显示此异常(抱歉,这只是西班牙语): 生产过程中出现了错误,但未实现要求的URI 'https://samsung/WCF40_SSL_Service/Service.svc'. 联合国秘书处 打算在多米尼加共和国境内提供联合国机构服务 多明尼奥斯民主共和国的政治与否 阿普拉帕拉服务肥皂。是否有可能在任何情况下 档案馆公共服务合同 多米尼加的政治和环境许可证 encabezados HTTP relacionados con SOAP。埃斯特错误坦比恩·普埃德 网络服务代理国际组织 内服阿曲布托效用可归因于。帕拉奥本纳·马斯 信息,国际领事馆 来自的英文翻译(不确定是否有帮助:) 尝试执行对URI地址的请求时出错https://samsung/WCF40_SSL_Service/Service.svc'. 由于访问服务的意图 在上下文中的适当控件之间没有政治性的控件之间的配置,或者对于SOAP服务没有适当的政治性。有可能需要与服务所有者联系,以便在控件之间发布政治文件,并确保允许发送与SOAP相关的HTTP标题。此错误也是由于在代理服务web中使用内部类型而未使用属性InternalsVisibleToAttribute造成的。要获取更多信息,请参阅内部异常 在我看来,这似乎是一个“clientaccesspolicy.xml”问题,但我非常确定它没有问题,它被放置在根路径、应用程序路径、其父路径中从Silverlight通过https使用WCF服务,silverlight,wcf,Silverlight,Wcf,我正在尝试以下示例代码: 看起来一切正常,但当它尝试从WCF调用异步方法时,会显示此异常(抱歉,这只是西班牙语): 生产过程中出现了错误,但未实现要求的URI 'https://samsung/WCF40_SSL_Service/Service.svc'. 联合国秘书处 打算在多米尼加共和国境内提供联合国机构服务 多明尼奥斯民主共和国的政治与否 阿普拉帕拉服务肥皂。是否有可能在任何情况下 档案馆公共服务合同 多米尼加的政治和环境许可证 encabezados HTTP relacionados
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
我试图在fiddler中查看应用程序是否正在发送clientaccesspolicy.xml请求,但事实并非如此!!!它甚至没有试图找到文件
我想我一定错过了一些琐碎的事情,但我不知道。。。有什么想法吗
提前感谢
服务器配置:
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="SqlSecureConnection" connectionString="Data Source=.;
Initial Catalog=aspnetdb;Integrated Security=SSPI"/>
</connectionStrings>
<system.web>
<roleManager enabled="true" />
<authentication mode="Forms" />
<compilation debug="true" targetFramework="4.0" />
<membership defaultProvider="MySqlMembershipProvider"
userIsOnlineTimeWindow="15">
<providers>
<clear />
<add
name="MySqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SqlSecureConnection"
applicationName="/"
enablePasswordRetrieval="false"
enablePasswordReset="false"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"
passwordFormat="Hashed" />
</providers>
</membership>
</system.web>
<system.serviceModel>
<services>
<service name="WCF_SecureService.Service"
behaviorConfiguration="ServBehave">
<endpoint
address=""
binding="customBinding"
bindingConfiguration="custBind"
contract="WCF_SecureService.IService">
</endpoint>
</service>
</services>
<bindings>
<customBinding>
<binding name="custBind">
<security authenticationMode="UserNameOverTransport"></security>
<httpsTransport></httpsTransport>
</binding>
</customBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServBehave">
<serviceMetadata httpsGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceCredentials>
<userNameAuthentication
userNamePasswordValidationMode="MembershipProvider"
membershipProviderName="MySqlMembershipProvider"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
客户端配置:
<configuration>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="CustomBinding_IService">
<security authenticationMode="UserNameOverTransport"
includeTimestamp="true">
<secureConversationBootstrap />
</security>
<textMessageEncoding messageVersion="Default"
writeEncoding="utf-8" />
<httpsTransport maxReceivedMessageSize="2147483647"
maxBufferSize="2147483647" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint
address="https://samsung/WCF40_SSL_Service/Service.svc"
binding="customBinding" bindingConfiguration="CustomBinding_IService"
contract="MyRef.IService" name="CustomBinding_IService" />
</client>
</system.serviceModel>
</configuration>
一种可能性是它与SSL证书相关 看起来您正在针对开发计算机运行https。这里可能存在的问题是:
- 您尚未安装SSL证书
- 您已安装自签名SSL证书,但客户端不信任它
您能同时提供客户端和服务器配置吗?当然,它们来了;-)非常感谢你的回答!!!正如您所说,我正在使用自己的开发机器来尝试这个示例,它有一个自签名SSL证书。您知道如何强制我的客户端信任该证书吗?如果您在浏览器中浏览到svc文件,您应该会收到一条红色横幅,表明它不信任该证书,请尝试单击该消息并选择在本地安装该证书。您正在浏览的计算机现在将信任该证书。这似乎不起作用:-(。您知道如何强制silverlight客户端避免此检查吗?