connecting my phone to a web service in a local computer [modified]
-
I have successfully connected my desktop application to a web service. My web reference is in http://localhost/ however when I tried it on my application for my phone, I cannot seem to connect to it. Do you know how I can connect to the web service? Is it different when connecting to it via a device application from a desktop app? Or is it just because I'm using a localhost url? I am simulating my phone by an emulator and just cradling it. :confused: I get this web exception:
Could not established connection to network
modified on Sunday, December 7, 2008 11:36 AM
-
I have successfully connected my desktop application to a web service. My web reference is in http://localhost/ however when I tried it on my application for my phone, I cannot seem to connect to it. Do you know how I can connect to the web service? Is it different when connecting to it via a device application from a desktop app? Or is it just because I'm using a localhost url? I am simulating my phone by an emulator and just cradling it. :confused: I get this web exception:
Could not established connection to network
modified on Sunday, December 7, 2008 11:36 AM
harcaype, accessing localhost on the emulator will most probably not work, as it is the emulator itself, not the development machine you are working on. As you've said you have to connect the emulator to the PC by cradling it, enable DMA on ActiveSync, and instead of localhost use the internal IP address of your PC (you can find out which IP you have under network settings or calling
ipconfig /all
on the command line. Cheers, Marcelo-- Marcelo Emmerich Software Development - Computer Graphics - Mobile Computing http://bytethings.blogspot.com
-
harcaype, accessing localhost on the emulator will most probably not work, as it is the emulator itself, not the development machine you are working on. As you've said you have to connect the emulator to the PC by cradling it, enable DMA on ActiveSync, and instead of localhost use the internal IP address of your PC (you can find out which IP you have under network settings or calling
ipconfig /all
on the command line. Cheers, Marcelo-- Marcelo Emmerich Software Development - Computer Graphics - Mobile Computing http://bytethings.blogspot.com
-
Thanks for the reply. I did what you just said, however, it still did not connect. I am currently reinstalling my activesync since it is also encountering its own issues. I took the IP address of my wireless network btw.
are you using the integrated web server from visual studio? That web server only accepts connections from localhost. Try to install IIS or any other web server on your PC and see if the emulator can connect to it. Marcelo
-- Marcelo Emmerich Software Development - Computer Graphics - Mobile Computing http://bytethings.blogspot.com
-
are you using the integrated web server from visual studio? That web server only accepts connections from localhost. Try to install IIS or any other web server on your PC and see if the emulator can connect to it. Marcelo
-- Marcelo Emmerich Software Development - Computer Graphics - Mobile Computing http://bytethings.blogspot.com
-
How do you do that? Someone also told me that I should create a simple html first then try it to host in my IIS. How do you do that? :confused:
check this if you have Xp: http://www.learnthat.com/courses/computer/windowsxp/iis/ or this if you have Vista: http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/ After you have installed IIS and created a default page, browse to http://localhost from the PC. If it works, try to navigate to http://[IP of PC] from the emulator (using mobile Internet Explorer) and see if it works. If that works too, you have to set up your IIS to work with visual studio instead of the built in web server. Marcelo
-- Marcelo Emmerich Software Development - Computer Graphics - Mobile Computing http://bytethings.blogspot.com
-
check this if you have Xp: http://www.learnthat.com/courses/computer/windowsxp/iis/ or this if you have Vista: http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/ After you have installed IIS and created a default page, browse to http://localhost from the PC. If it works, try to navigate to http://[IP of PC] from the emulator (using mobile Internet Explorer) and see if it works. If that works too, you have to set up your IIS to work with visual studio instead of the built in web server. Marcelo
-- Marcelo Emmerich Software Development - Computer Graphics - Mobile Computing http://bytethings.blogspot.com
I already have an IIS installed. And about the localhost . Mozilla Firefox issued me a username and password. I tried my computer login and everything I think possible, but still it did not allow me to access the page. Why is this? And how do I deal with it? Someone also told me that I should create first an html file and make IIS host it. How do you host that? I'm sorry. I'm very new to this. :(