Web Service issues - DOTNET

This is a discussion on Web Service issues - DOTNET ; T-Mobile Shadow Windows Mobile 6 Standard 2 GB SD card I am writing a CF application that consumes a web service which resides on my server at home. This server is different from the development machine. The web service URL ...

+ Reply to Thread
Results 1 to 8 of 8

Web Service issues

  1. Default Web Service issues

    T-Mobile Shadow
    Windows Mobile 6 Standard
    2 GB SD card

    I am writing a CF application that consumes a web service which resides on
    my server at home. This server is different from the development machine.
    The web service URL uses a DynDns domain and port 8080, which is forwarded
    by my pix firewall to port 80 on the server, i.e.

    http://Dyndnsname.net:8080/Webservicename

    gets forwarded to

    http://Dyndnsname.net/Webservicename


    The server's domain is getting resolved by a hosts file entry on the
    development box, but does not resolve in the internal network otherwise. The
    first URL that uses port 8080 would not work at all for this server on the
    internal network.

    Here is the weird thing. When I deploy to the device, I can debug and run
    the application on the device and it works like a charm. The web service is
    found, using the external URL with port 8080. I can hit the service from IE
    on the device, too, and get the info page.
    As soon as I unplug the USB cable, the app stops working. The same running
    instance starts getting SOAP exceptions or timeouts. If I start a new
    instance while disconnected, I get an unspecific error and have not been
    able to capture the exception yet. But: I can still hit the webservice page
    with IE and get the same results as I did when the USB cable was connected
    and the device was controlled by ActiveSync. What's going on? What changes,
    connectivity-wise, when I disconnect the device, that affects a custom app,
    but not IE?



  2. Default Re: Web Service issues

    And while I am not sure it matters, here is the rest of the stack:

    - VS 2006
    - CF 2.0
    - ActiveSync 4.5

    "Christian Donner" <info@sqlservant.com> wrote in message
    news:YoBfj.41$O97.10@trndny01...
    > T-Mobile Shadow
    > Windows Mobile 6 Standard
    > 2 GB SD card
    >
    > I am writing a CF application that consumes a web service which resides on
    > my server at home. This server is different from the development machine.
    > The web service URL uses a DynDns domain and port 8080, which is forwarded
    > by my pix firewall to port 80 on the server, i.e.
    >
    > http://Dyndnsname.net:8080/Webservicename
    >
    > gets forwarded to
    >
    > http://Dyndnsname.net/Webservicename
    >
    >
    > The server's domain is getting resolved by a hosts file entry on the
    > development box, but does not resolve in the internal network otherwise.
    > The first URL that uses port 8080 would not work at all for this server on
    > the internal network.
    >
    > Here is the weird thing. When I deploy to the device, I can debug and run
    > the application on the device and it works like a charm. The web service
    > is found, using the external URL with port 8080. I can hit the service
    > from IE on the device, too, and get the info page.
    > As soon as I unplug the USB cable, the app stops working. The same running
    > instance starts getting SOAP exceptions or timeouts. If I start a new
    > instance while disconnected, I get an unspecific error and have not been
    > able to capture the exception yet. But: I can still hit the webservice
    > page with IE and get the same results as I did when the USB cable was
    > connected and the device was controlled by ActiveSync. What's going on?
    > What changes, connectivity-wise, when I disconnect the device, that
    > affects a custom app, but not IE?
    >




  3. Default Re: Web Service issues

    Well, I think it works while debugging, because the connection you have
    there is already in the internal network (somebody correct me if >I am
    wrong).

    All I can say is that I had the same problems with reaching an IIS
    Server (on my Home PC behind a router) from outside. If i called the
    server from network it did work out and i think same is happening to you.

    Did test different settings (IIS and Router), nothing worked out,
    something is wrong.

    Bye,
    Dominik

    --
    P.S. To reply via email, remove '-REMOVE-THIS-' from my address!

    Dominik Gallus
    http://www.dgallus.de


    Christian Donner schrieb:
    > T-Mobile Shadow
    > Windows Mobile 6 Standard
    > 2 GB SD card
    >
    > I am writing a CF application that consumes a web service which resides on
    > my server at home. This server is different from the development machine.
    > The web service URL uses a DynDns domain and port 8080, which is forwarded
    > by my pix firewall to port 80 on the server, i.e.
    >
    > http://Dyndnsname.net:8080/Webservicename
    >
    > gets forwarded to
    >
    > http://Dyndnsname.net/Webservicename
    >
    >
    > The server's domain is getting resolved by a hosts file entry on the
    > development box, but does not resolve in the internal network otherwise. The
    > first URL that uses port 8080 would not work at all for this server on the
    > internal network.
    >
    > Here is the weird thing. When I deploy to the device, I can debug and run
    > the application on the device and it works like a charm. The web service is
    > found, using the external URL with port 8080. I can hit the service from IE
    > on the device, too, and get the info page.
    > As soon as I unplug the USB cable, the app stops working. The same running
    > instance starts getting SOAP exceptions or timeouts. If I start a new
    > instance while disconnected, I get an unspecific error and have not been
    > able to capture the exception yet. But: I can still hit the webservice page
    > with IE and get the same results as I did when the USB cable was connected
    > and the device was controlled by ActiveSync. What's going on? What changes,
    > connectivity-wise, when I disconnect the device, that affects a custom app,
    > but not IE?
    >
    >


  4. Default Re: Web Service issues

    Well, I think it works while debugging, because the connection you have
    there is already in the internal network (somebody correct me if >I am
    wrong).

    All I can say is that I had the same problems with reaching an IIS
    Server (on my Home PC behind a router) from outside. If i called the
    server from network it did work out and i think same is happening to you.

    Did test different settings (IIS and Router), nothing worked out,
    something is wrong.

    Bye,
    Dominik

    --
    P.S. To reply via email, remove '-REMOVE-THIS-' from my address!

    Dominik Gallus
    http://www.dgallus.de


    Christian Donner schrieb:
    > T-Mobile Shadow
    > Windows Mobile 6 Standard
    > 2 GB SD card
    >
    > I am writing a CF application that consumes a web service which resides on
    > my server at home. This server is different from the development machine.
    > The web service URL uses a DynDns domain and port 8080, which is forwarded
    > by my pix firewall to port 80 on the server, i.e.
    >
    > http://Dyndnsname.net:8080/Webservicename
    >
    > gets forwarded to
    >
    > http://Dyndnsname.net/Webservicename
    >
    >
    > The server's domain is getting resolved by a hosts file entry on the
    > development box, but does not resolve in the internal network otherwise. The
    > first URL that uses port 8080 would not work at all for this server on the
    > internal network.
    >
    > Here is the weird thing. When I deploy to the device, I can debug and run
    > the application on the device and it works like a charm. The web service is
    > found, using the external URL with port 8080. I can hit the service from IE
    > on the device, too, and get the info page.
    > As soon as I unplug the USB cable, the app stops working. The same running
    > instance starts getting SOAP exceptions or timeouts. If I start a new
    > instance while disconnected, I get an unspecific error and have not been
    > able to capture the exception yet. But: I can still hit the webservice page
    > with IE and get the same results as I did when the USB cable was connected
    > and the device was controlled by ActiveSync. What's going on? What changes,
    > connectivity-wise, when I disconnect the device, that affects a custom app,
    > but not IE?
    >
    >


  5. Default Re: Web Service issues

    What you are saying is trivial, but
    - I cannot be hitting the server through the inside network, because it does
    not listen on port 8080. I must be coming in via the Edge network through
    the firewall, even when the device is on ActiveSync (unless I am
    misunderstanding what ActiveSync does)
    - I can always hit the web service on port 8080 using IE

    I am actually getting a System.Net.Webexception, but because I cannot use
    the debugger (it works fine when the device is plugged in), this is a pain
    to pin down.


    "Dominik Gallus" <me@dgallus-REMOVE_THIS-.de> wrote in message
    news:477EF0D7.3080402@dgallus-REMOVE_THIS-.de...
    > Well, I think it works while debugging, because the connection you have
    > there is already in the internal network (somebody correct me if >I am
    > wrong).
    >
    > All I can say is that I had the same problems with reaching an IIS Server
    > (on my Home PC behind a router) from outside. If i called the server from
    > network it did work out and i think same is happening to you.
    >
    > Did test different settings (IIS and Router), nothing worked out,
    > something is wrong.
    >
    > Bye,
    > Dominik
    >
    > --
    > P.S. To reply via email, remove '-REMOVE-THIS-' from my address!
    >
    > Dominik Gallus
    > http://www.dgallus.de
    >
    >
    > Christian Donner schrieb:
    >> T-Mobile Shadow
    >> Windows Mobile 6 Standard
    >> 2 GB SD card
    >>
    >> I am writing a CF application that consumes a web service which resides
    >> on my server at home. This server is different from the development
    >> machine. The web service URL uses a DynDns domain and port 8080, which is
    >> forwarded by my pix firewall to port 80 on the server, i.e.
    >>
    >> http://Dyndnsname.net:8080/Webservicename
    >>
    >> gets forwarded to
    >>
    >> http://Dyndnsname.net/Webservicename
    >>
    >>
    >> The server's domain is getting resolved by a hosts file entry on the
    >> development box, but does not resolve in the internal network otherwise.
    >> The first URL that uses port 8080 would not work at all for this server
    >> on the internal network.
    >>
    >> Here is the weird thing. When I deploy to the device, I can debug and run
    >> the application on the device and it works like a charm. The web service
    >> is found, using the external URL with port 8080. I can hit the service
    >> from IE on the device, too, and get the info page.
    >> As soon as I unplug the USB cable, the app stops working. The same
    >> running instance starts getting SOAP exceptions or timeouts. If I start a
    >> new instance while disconnected, I get an unspecific error and have not
    >> been able to capture the exception yet. But: I can still hit the
    >> webservice page with IE and get the same results as I did when the USB
    >> cable was connected and the device was controlled by ActiveSync. What's
    >> going on? What changes, connectivity-wise, when I disconnect the device,
    >> that affects a custom app, but not IE?




  6. Default Re: Web Service issues

    Interesting - I am indeed coming in through the local network when connected
    to ActiveSync. I clearly see this in the IIS log:

    2008-01-05 03:30:19 W3SVC259463726 10.10.1.110 POST
    /CurrentTemperatures.asmx - 80 - 10.10.1.176
    Mozilla/4.0+(compatible;+MSIE+6.0;+MS+.NET+CF+Web+Services+Client+Protocol+2.0.7045.0)
    200 0 0

    10.10.1.176 is the development box that the device is connected to.

    But my WS URL is http://Dyndnsname.net:8080/CurrentTemperatures.asmx

    So it seems that the some component along the way is stripping out that port
    information, and that I am probably not getting in through the firewall when
    disconnected.



  7. Default Re: Web Service issues

    I got it working, and it was indeed related to the port number disappearing
    from the URL. In my web.config, the URL string has the port. When I
    inspected the URL property of the soap client before the request, the port
    was gone. I now set the URL explicitely in the code and it works as
    expected: the application hits the web service when I am not connected (on
    port 8080 through the firewall). When I am connected via USB cable, the
    request fails, also as expected.



  8. Default Re: Web Service issues

    One more posting about this - the reason for this is was a really stupid
    oversight on my part.
    The URL (not in the web.config, of course, as I said previously, but in the
    Web Reference properties) is not being used at runtime. Visual Studio only
    uses it to generate various code that it does not show you. Because my web
    service is not accessible with the external port from my internal network, I
    was unable to "Update the Web Reference" with the correct URL. I ignored
    this fact, and the generated code behind the scenes actually did not know
    about the external port. There is no good solution to this other than
    manually fixing the WS URL in Reference.cs and Reference.map.



+ Reply to Thread