Mobile Device testing hitting local WebAPI

3 posts, 1 answers
  1. Craig
    Craig avatar
    43 posts
    Member since:
    Aug 2013

    Posted 05 Sep 2013 Link to this post

    Using the simulator is working great for hitting my local IIS box running WebAPI for my datasources.  However when i plug in my phone(android) and debug my login just spins (leaves the loading icon on screen forever).

    I assume it is do to my WebAPI being local and the phone not seeing the local box.  Is it possible to connect to your local machine for the datasource.  I have tried "localhost", IP address, Computer Name and nothing seems to work. Any insight would be helpful.

    NOTE:  I am using http - so certs not the issue 
  2. iliev
    iliev avatar
    40 posts

    Posted 06 Sep 2013 Link to this post

    Hello Craig,

    To access your IIS hosted WebAPI application you must:
    1. Make sure your application works in simulator through "http://[YourMachineName]"
      (This will assure you hosted everything right and it is accessible through the network stack)
    2. Make sure your phone can access your machine (for example through wifi).
      To test if this works - open your browser and try to execute a GET query against "http://[YourMachineName]"

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. Answer
    Craig avatar
    43 posts
    Member since:
    Aug 2013

    Posted 06 Sep 2013 Link to this post

    OK I figured it out. 

    I was under the assumption that the traffic was flowing over the USB wired connection - which it is not. (Please correct me if I am wrong iliev).

    So  I just had to open up port 80 on my local machine in windows firewall (I am running Win7) and it now works. I ended up using the local IP address to connect (Example: 192.168.1.X for most of you on a home network).

Back to Top