Note that there are some explanatory texts on larger screens.

plurals
  1. POAFNetworking Self Signed Certificate iOS 5.1 vs 6.1
    primarykey
    data
    text
    <p>I'm using AFNetworking with an iPad app to connect to a server using https with a self-signed certificate.</p> <p>On my device running iOS 6.1 it all works fine but when we tested on the iOS 5.1 simulator and a 5.1 device I get a 403 response.</p> <p>We've tried:</p> <pre><code>#define _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_ </code></pre> <p>and:</p> <pre><code>[operation setAuthenticationAgainstProtectionSpaceBlock:^BOOL(NSURLConnection *connection, NSURLProtectionSpace *protectionSpace) { return YES; }]; </code></pre> <p>as was suggested elsewhere but these still gave the same error. This is the nslog of the error sent to the AFHTTPRequestOperation's failure block:</p> <pre><code>Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 403" UserInfo=0x10337330 {NSLocalizedRecoverySuggestion=&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;The page cannot be displayed&lt;/TITLE&gt; &lt;META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252"&gt; &lt;STYLE type="text/css"&gt; BODY { font: 8pt/12pt verdana } H1 { font: 13pt/15pt verdana } H2 { font: 8pt/12pt verdana } A:link { color: red } A:visited { color: maroon } &lt;/STYLE&gt; &lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE width=500 border=0 cellspacing=10&gt;&lt;TR&gt;&lt;TD&gt; &lt;h1&gt;The page cannot be displayed&lt;/h1&gt; You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed. &lt;hr&gt; &lt;p&gt;Please try the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Contact the Web site administrator if you believe this directory should allow execute access.&lt;/li&gt; &lt;/ul&gt; &lt;h2&gt;HTTP Error 403.1 - Forbidden: Execute access is denied.&lt;br&gt;Internet Information Services (IIS)&lt;/h2&gt; &lt;hr&gt; &lt;p&gt;Technical Information (for support personnel)&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Go to &lt;a href="http://go.microsoft.com/fwlink/?linkid=8180"&gt;Microsoft Product Support Services&lt;/a&gt; and perform a title search for the words &lt;b&gt;HTTP&lt;/b&gt; and &lt;b&gt;403&lt;/b&gt;.&lt;/li&gt; &lt;li&gt;Open &lt;b&gt;IIS Help&lt;/b&gt;, which is accessible in IIS Manager (inetmgr), and search for topics titled &lt;b&gt;Configuring ISAPI Extensions&lt;/b&gt;, &lt;b&gt;Configuring CGI Applications&lt;/b&gt;, &lt;b&gt;Securing Your Site with Web Site Permissions&lt;/b&gt;, and &lt;b&gt;About Custom Error Messages&lt;/b&gt;.&lt;/li&gt; &lt;li&gt;In the IIS Software Development Kit (SDK) or at the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=8181"&gt;MSDN Online Library&lt;/a&gt;, search for topics titled &lt;b&gt;Developing ISAPI Extensions&lt;/b&gt;, &lt;b&gt;ISAPI and CGI&lt;/b&gt;, and &lt;b&gt;Debugging ISAPI Extensions and Filters&lt;/b&gt;.&lt;/li&gt; &lt;/ul&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt; , AFNetworkingOperationFailingURLResponseErrorKey=&lt;NSHTTPURLResponse: 0x875be10&gt;, NSErrorFailingURLKey=..., NSLocalizedDescription=Expected status code in (200-299), got 403, AFNetworkingOperationFailingURLRequestErrorKey=&lt;NSMutableURLRequest ...&gt;} </code></pre> <p>I've replaced the URL with "..."</p> <p>Any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload