title: First web service call through WLAN is raising an exception in Wince 5.0
body: <p>I have developed a application that run on a device with Wince 5.0.
  I make web service calls using WLAN. The application works fine if the app server is with the LAN.
  In the other case, it raises a exception only for the first time when the application tries to communicate with the appserver. If the application is launched for the second time it does not raise any exception.</p>
  
  <p>The stack trace:</p>
  
  <p>Tuesday, April 13, 2010 - 10:03:04 AM:
  Unable to connect to the remote server
     at System.Net.HttpWebRequest.finishGetResponse()
     at System.Net.HttpWebRequest.GetResponse()
     at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
     at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
     at System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke(String methodName, Object[] parameters, WebClientAsyncResult asyncResult)
     at Aarya.Service.MIDServiceProxy.ManagementService.MIDAuthenticateLoginandRole(String sUsername, String sPassword)
     at Aarya.Modules.MID.ProxyWrapper.ManagementServiceWrapper.MIDAuthenticateLoginandRole(String sUsername, String sPassword)
     at Aarya.MID.AuthenticateManager.Logon(String loginName, String password)
     at Aarya.MID.Shell.PerformAsyncLogin()</p>
  
  <hr>
  
  <p>A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
     at System.Net.Sockets.Socket.ConnectNoCheck(EndPoint remoteEP)
     at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
     at System.Net.Connection.doConnect(IPEndPoint ep)
     at System.Net.Connection.connect(Object ignored)
     at System.Threading.ThreadPool.WorkItem.doWork(Object o)
     at System.Threading.Timer.ring()</p>