title: Cannot access a webservice from mobile device
body: <p>I developed a program in a mobile device (Pocket PC 2003) to access a web service, the web service is installed on a Windows XP SP2 PC with IIS, the PC has the IP 192.168.5.2. </p>
  
  <p>The device obtains from the wireless network the IP 192.168.5.118 and the program works OK, it calls the method from the web service and executes the action that is needed. This program is going to be used in various buildings.</p>
  
  <p>Now I have this problem, it turns that when I try to test it in another building (distances neraly about 100 mts. or 200 mts.) connected with the network, the program cannot connect to the webservice, at this moment the device gets from an Access Point the IP 192.168.10.25, and it accesses the same XP machine I stated before (192.168.5.2). I made a mobile aspx page to verify that I can reach the web server over the network and it loads it in the device, I even made a winform that access the same webservice in a PC from that building and also works there so I don't understand what is going on. I also tried to ping that 192.168.5.2 PC and it responds alive.</p>
  
  <p>After that fail I returned to the original place where I tested the program before and it happens that it works normally.</p>
  
  <p>The only thing that I look different here is that the third number in the IP is 10 instead of 5, another observation is that I can't ping to the mobile device. I feel confused I don't know what happens here? What could be the problem?</p>
  
  <p>This is how I call the web service;</p>
  
  <pre><code>//Connect to webservice
  svc = new TheWebService(); 
  svc.Credentials = new System.Net.NetworkCredential(Settings.UserName, Settings.Password);
  svc.AllowAutoRedirect = false;
  svc.UserAgent = Settings.UserAgent;
  svc.PreAuthenticate = true;
  svc.Url = Settings.Url;
  svc.Timeout = System.Threading.Timeout.Infinite;
  
  //Send information to webservice
  svc.ExecuteMethod(info);
  </code></pre>
  
  <p>the content of the app.config in the mobile device is;</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;appSettings&gt;
      &lt;add key="UserName" value="administrator" /&gt;
      &lt;add key="Password" value="************" /&gt;
      &lt;add key="UserAgent" value="My User Agent" /&gt;
      &lt;add key="Url" value="http://192.168.5.2/WebServices/TWUD.asmx" /&gt;
    &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Does anyone have an idea what is going on?</p>