I have some iOS 5 code that I am using to interface to an ASP.NET web service. The code can (seemingly) connect OK to my service but a blank reply is sent every time. I have stepped through the code and saw how iOS takes the service domain address and turns it into an IP address and tests for connection. Does it also use the IP address for a connection when running? The problem is that I have my service running on a shared ASP.NET box so mysite.com/mywebservice.asmx will resolve while an ip address like xxx.xxx.xxx.xxx/mywebservice.asmx will not resolve at all. Could this be the root cause of why my web request is blank every time?
Share
I’m guessing your web site has a registered domain name which is auto-mapped to an IP . Therefore, according to a similar issue that we faced earlier, you need to analyze the full request that is being sent . Tools like – firebug http://getFirebug.com , poster https://addons.mozilla.org/en-US/firefox/addon/poster/ can be really handy for the same.
The issue I faced was solved by changing the “user-agent” header in the request from the IOS device.
So you can replace the value of the header you send with the one that is sent from the browser. Also, there can be some cookies being sent by the browser as a default behaviour.
I think those would be good directions to look, considering the web service you hit gives a reply to the browser.