Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. connecting my phone to a web service in a local computer [modified]

connecting my phone to a web service in a local computer [modified]

Scheduled Pinned Locked Moved C#
sysadminquestion
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harcaype
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • H harcaype

      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

      M Offline
      M Offline
      Marcelo Emmerich
      wrote on last edited by
      #2

      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

      H 1 Reply Last reply
      0
      • M Marcelo Emmerich

        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

        H Offline
        H Offline
        harcaype
        wrote on last edited by
        #3

        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.

        M 1 Reply Last reply
        0
        • H harcaype

          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.

          M Offline
          M Offline
          Marcelo Emmerich
          wrote on last edited by
          #4

          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

          H 1 Reply Last reply
          0
          • M Marcelo Emmerich

            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

            H Offline
            H Offline
            harcaype
            wrote on last edited by
            #5

            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:

            M 1 Reply Last reply
            0
            • H harcaype

              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:

              M Offline
              M Offline
              Marcelo Emmerich
              wrote on last edited by
              #6

              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

              H 1 Reply Last reply
              0
              • M Marcelo Emmerich

                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

                H Offline
                H Offline
                harcaype
                wrote on last edited by
                #7

                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. :(

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups