Flash Player embedded in .NET WinForms app cannot load HTTPS content with self-signed certificate
I have a Flash Player ActiveX control embedded in a .NET WinForms application and am 开发者_开发百科trying to load a SWF into the FP control over an HTTPS url. In development I'm using a self-signed certificate and it seems that in this scenario I can't get FP to accept the certificate and allow the HTTPS communications.
When I try to load the swf over https directly, I don't see the swf and when I right-click on the control I see "Movie not loaded".
I can load the swf over http and then try to make Flash Remoting calls over https. I don't expect this to work by default but I added a crossdomain.xml file to allow insecure communications. The crossdomain.xml file is in the root of the server but is not loaded. I added an explicit call to loadPolicyFile
with the full https url and the crossdomain.xml file is still not loaded. The local IIS logs don't show any request for the file at all, nothing in the HTTPERR file, and Flash's policyfiles.txt log says
Warning: Failed to load policy file from https://localhost/crossdomain.xml
If I host the swf in a browser, then the browser prompts to accept the certificate and everything works fine. I've accepted the certificate in IE and Firefox.
I also tried calling DisableLocalSecurity()
on the FP ActiveX control but it had no effect. I didn't really expect it to since I'm not actually loading the swf locally, it's loaded from a url.
Can anyone confirm if the self-signed cert really is the problem? Is there a way to get FP to accept the certificate? Any way to bypass the http/https restriction (this is a locally installed app so I can change any local config files we need)?
Turns out Flash Player itself doesn't support HTTPS in standalone or embedded in a desktop application. It does support HTTPS in a browser but then it's using the browser for https calls.
HTTPS support in Flash Player embedded in Desktop apps is a new feature in Flash Player 11.
http://kb2.adobe.com/cps/916/cpsid_91694.html
New Features in Flash Player 11
TLS Secure Sockets Support (new for Flash Player) — Enables secure communications for client/server applications.
精彩评论