The page I am trying to fetch is on a different subdomain. Everything
works fine when I access the pages in a browser on my Mac - Safari,
Firefox and Chrome all work fine, with no errors or warnings. When I
try to load the pages in Safari on my iPhone, the login works fine,
but the target page does not load and there is no error.
I am using ASIHTTPRequest in an iPhone project to log into a website
and scrape some details and have encountered an error I can't quite
figure out. I am using https to post username/password to the server.
The login works fine, but when I try to fetch one of the pages which
is one a different subdomain, I get an error: OSStatus error -9806.
The page I am trying to fetch resides in an iframe on the main page,
but has a different subdomain. The page and frame load fine in a
browser on my Mac with no errors or warnings (I have tried Safari,
Firefox and Chrome - all okay) but when I try to load the page in
Safari on the iPhone the login works fine, but the iframe doesn't
load, and I get no errors. I wrote a short test app using a UIWebView
so I could try to trap any errors Safari was raising, and when I try
to load the iframe page, I get an error: "An SSL error has occurred
and a secure connection to the server cannot be made."
I have tried [request setValidatesSecureCertificate:NO] but I am
getting the same error. Any ideas?
(FWIW the guys working on the Android version of this app have had no
problems with this particular site - everything works peachy from
java, so we are at a loss here.)
I found a Technical Note that may shed some light on this error, but I
am not sure where this workaround would fit into ASIHTTPRequest:
http://developer.apple.com/library/ios/#technotes/tn2287/_index.html#//apple_ref/doc/uid/DTS40011309