So I’ve been toiling over this app trying to figure out this strange behaviour and I’m just getting more and more confused so I thought maybe a more experienced WP7 developer could shed some light on the issue.
I have a (working?) application and I can run it perfectly fine when I’m running it though visual studio and even just when the phone is plugged into the computer but as soon as I disconnect the phone from the computer I can no longer send Httprequests and my webbrowser control no-longer loads pages from my server. Breakdown:
-
I open the app on the phone while it’s plugged into the machine hosting the server and it works perfectly fine, no buggs, all requests go though and webbrowser navigates to pages.
-
Now if I unplug it from the computer while the app is running natively I lose all ability to make request or navigations (to server hosted pages) in my webbrowser.
-
Now if I plug it back in all the “Server not found” and “We’re having trouble displaying this page” errors go away and my app returns to a usable state.
Is there some kind of permission that must be accepted before the phone can send and receive data from my server that is overridden when the phone is connected to the computer? Has anyone else run into this problem ever or do I just have something wrong with me? I’m am at a loss to find the issue, if you could point me in the right direction that would be great.
EDIT: Ok, so I think it has something to do with it being connected to a computer which is hosting the server. Because when I connect it to my mac (which doesn’t have zune or any microsoft stuff) the app responds the same as not being connected (i.e no http or webbrowser)
-
Just tried running the app again while it was plugged into the server-computer but without Zune running and it did not work (i.e no http or webbrowser). So Zune is DEFINITELY and influencing factor, does anyone know what it’s doing that I’m not doing when I unplug it or shut-down Zune? (note: the app is running natively, not through VS)
-
If I run it on a different computer with Zune running on it, it isn’t working either, which I find strange….
-
Just found this: http://answers.microsoft.com/en-us/zune/forum/zune_install-pc/cannot-connect-to-server-or-dns-error-related-to/b224cffb-3ec0-456a-86f3-f9b931a92367 hopefully it will solve my problems…..we’ll see….(Edit: couldn’t find an answer here)
Thanks for the help!
Wow! I cannot believe I could have overlooked this. So the network that I thought I was using was different from the one my phone was using. Did you know that the windows phone (at least Lumia 800) automatically uses the internet from whatever computer it’s plugged into and NOT the wireless network it’s currently connected to if Zune is running on that computer? (well I didn’t) On top of that the network that I thought it was connected to (and was using when I disconnected from the server computer) couldn’t communicate with the network my server was running. This combination made it really hard to figure out what was going on and I spent WAY to much time trying to figure it out.
Thanks for the suggestions and sorry if I waisted anyones time.