开发者

How can I make a HTTPS call using HttpService in flex

开发者 https://www.devze.com 2022-12-16 09:14 出处:网络
I want to make an https call using HttpService. My code is working perfect when the url is http, but when i can the url to https is gives me the following error :

I want to make an https call using HttpService. My code is working perfect when the url is http, but when i can the url to https is gives me the following error :

[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]

How should I make a Https cal开发者_高级运维l??

Regards Zeeshan


Is your SWF hosted on the same domain? If so, is it being served over HTTPS as well? If the answer is no to either of those questions, you'll need a crossdomain.xml file at the root of the server hosting the service you want to call. You might check out this Adobe article on the subject.

For example, this would allow a SWF served over HTTP on example.com to access HTTPS services on your server:

crossdomain.xml

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
    "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>
    <allow-access-from domain="example.com" secure="false"/>
</cross-domain-policy>

Ensure that the crossdomain.xml file is accessible from the root of your domain (ie: http://myserver.com/crossdomain.xml).

Hope that helps.


Make sure that the certificate is valid or accepted in the browser.

Tip: under windows it does not matter which browser you are using you have to accept the certificate in Internet Explorer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号