以https iPad上的AIR应用程序问题 [英] Problems with https on iPad from Air app

查看:175
本文介绍了以https iPad上的AIR应用程序问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发出了iPad的内部空气的应用程序,试图通过SSL(HTTPS)使用的HTTPService连接到Jetty Web服务器。即使是最简单的GET返回错误#2032(运行与普通HTTP OK)。

I have developed an in-house Air app for the iPad that tries to connect to a jetty web server via SSL (https) using HTTPService. Even the simplest GET returns error #2032 (runs OK with plain http).

我已经检查了明显的事情:URL是正确的,证书是正确的,正确安装,我使用的是正确的端口,这是开放的。作为事实上,这个URL可以从Safari浏览器在iPad上访问没有问题。它还对ADL正确运行。

I have checked the obvious things: URL is correct, certificate is correct and correctly installed, I am using the right port, which is open. As a matter of fact, the URL can be accessed from Safari on the iPad without problems. It also runs correctly on adl.

我使用的是iPad 2的与iOS 5的应用是建立空气4.6。

I am using an iPad 2 with iOS 5. The application was built with Air 4.6.

任何想法?

推荐答案

您已经张贴在我的线程。 我发现了一个解决这个问题由我自己。它为我工作正常。

you have posted in my Thread. I found a solution for this problem by myself. it works fine for me.

如果您有由第三方公司就应该签署的证书。如果没有,请执行下列操作步骤:

If you have a certificate which is signed by a third company it should work. if not, do the following steps:

首先,我已经从装载程序(我使用的Flex HTTPService在)改变了的contentType为应用程序/ x-WWW的形式urlen codeD;但我认为它的唯一重要的,我的情况。

First I have changed the contentType from the loader ( I use the HTTPService from Flex) to "application/x-www-form-urlencoded"; but I think its only important in my case.

二中创建一个的StageWebView,将其放置在舞台上,并在屏幕外的视口。不是要求从的StageWebView功能使用loadURL与应用程序的启动你的HTTPS URL。

Second created a StageWebView, place it on stage and give it a viewport outside the screen. Than call the function loadURL from the StageWebView with your https url on startup of the application.

如果该应用程序在iOS设备上运行,那问你,如果你想有一个对话框apears允许自签名证书。之后,你有接受证书的下一个请求会工作。

If the application runs on an ios device, a dialog apears that ask you if you want to allow a selfsigned certificate. After you have accept the certificate the next request will work.

有两个缺点: •您必须接受应用程序的每一个新的启动证书。 •您第一次调用(通过的StageWebView)将无法正常工作。因为这个电话对话,你不能派遣对话框输入。所以,你必须自己来处理它,你作出这样的对话后,你的HTTPS请求。

There are two disadvantages: • You have to accept the certificate on every new Startup of the app. • You first call (over the stageWebView) will not work. Because this calls the dialog and you cant dispatch the dialog input. So you have to handle it by yourself that you make your HTTPS request after that dialog.

这篇关于以https iPad上的AIR应用程序问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆