Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8785271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:18:40+00:00 2026-06-13T21:18:40+00:00

I am using AFNetworking to connect from an iOS v6.0 app to my local

  • 0

I am using AFNetworking to connect from an iOS v6.0 app to my local Cold Fusion 8 server, not on the same machine but on the same network and the connection times out. When I use an external public server it works fine.

I have tried the connection via IP address and it doesn’t work.
I have tried an entry in the hosts file assigning a domain name to the IP address and this doesn’t work either. Please see the error below.
I can however connect via a web browser just fine.
Also, the server side files are exactly the same. Versions of Cold Fusion are the same. The only difference that I can find are the public server is Win2003 with IIS6 and the local server is Windows7 with IIS7.

Any thoughts on why this would not work on a local network. Makes local development kind of difficult.

Here is the relevant code:

// load params
NSMutableDictionary *myParams = [[NSMutableDictionary alloc] init]; 
[myParams setValue:@"Hello" forKey:@"Parameter1"];
[myParams setValue:@"There" forKey:@"Parameter2"];

   // Load the base URL into a URL object
   // Changing this to an external public server works fine
NSURL *baseURL = [NSURL URLWithString:@"http://www.mylocalmachine.com/"];

// Create HTTP client and init with base url
AFHTTPClient *myHttpClient = [[AFHTTPClient alloc] initWithBaseURL:baseURL];

// POST request to path with the parameters
NSMutableURLRequest *myRequest = [myHttpClient requestWithMethod:@"POST" path:@"myfile.cfm" parameters:myParams];

// Block response from the HTTP client request and pass it back to the calling object
AFJSONRequestOperation *myOperation = [AFJSONRequestOperation JSONRequestOperationWithRequest:myRequest
                                                                                      success:^(NSURLRequest *mySuccessRequest, NSHTTPURLResponse *mySuccessResponse, id mySuccessJSON)
    {
        // PROCESS THE SUCCESS RESPONSE;
    }
                                                                                      failure:^(NSURLRequest *myFailureRequest, NSHTTPURLResponse *myFailureResponse, NSError *myFaliureError, id myFailureJSON)
    {
        // PROCESS THE FAILURE RESPONSE... AFTER 60 seconds the system will fallout to this block.



    }];

// Create a queue object
NSOperationQueue *myQueue = [[NSOperationQueue alloc] init];

// Add the operation object to the queue
[myQueue addOperation:myOperation];

The following is the error I get print the myFailureError object

Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x8481000 {NSErrorFailingURLStringKey=http://www.mylocalmachine.int/myfile.cfm, NSErrorFailingURLKey=http://www.mylocalmachine.int/myfile.cfm, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x9189e20 "The request timed out."}

Update—-
I believe I have narrowed the issue down to what I beleive to be an issue with the iPhone simulator accessing IIS 7. It will access previous versions of IIS on the same network using the same code no problem.
The problem may be in the iPhone Simulator’s User-Agent. I have tried to find a way to change the iPhone Simulator’s User-Agent or allow the User-Agent in IIS 7 but can not seem to figure it out. The User-Agent the iPhone Simulator 6 is presenting is (iPhone Simulator; ios 6.0; Scale/2.00).

Does anyone know how to either allow this User-Agent on IIS 7 or change the User-Agent in the iPhone simulator?

Has anyone else seen this issue?
Thanks in advance,
Ed

Update—-

Hi Everyone
Ok so I figured out how to change the User-Agent and Content-Type using the NSMutableURLRequest. I changed these to match what the browser would send, FireFox browser, and tried again to no avail. I still believe there is an issue with the configuration of IIS 7.5 but I can not find it…
Thanks for anyones help!!!
Ed

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:18:42+00:00Added an answer on June 13, 2026 at 9:18 pm

    I have resolved this issue. I will post what the resolution was to hopefully help someone else with a similar issue.
    Turns out the problem was AVG installed on the system that was running IIS 7. It was a difficult issue to determine because any other system could access the web server with out any problems. It was only specific with the iPhone simulator accessing the system running IIS7. Even Safari or FireFox running on the same Mac would work just fine. Now what within AVG was causing the problem… That is yet to be determined.
    I truly hope this helps someone along the way!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the AFNetworking library to pull a JSON feed from a server to
I'm currently migrating my app from using ASIHTTPRequest to AFNetworking. I know synchronous requests
I'm using AFNetworking as a network layer for my iPhone app which connects to
I'm using AFNetworking for my iOs app. I need to implement a search-suggest like
I am trying to send a username and password from an iOS app using
I wrote two code both are same Using NSURLConnection and Using AFNetworking. My NSURLConnection
I am trying to log into google reader using AfNetworking AfHttpClient but I am
As the title implies, I am using AFNetworking in an iOS project in which
We're using AFNetworking in our mobile app and a lot of times we will
I'm using AFNetworking to pull images from a URL, resize, store to disk and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.