Proxy class for web service access: target IP configurable?

Discussion in 'ASP .Net' started by Roland Riess, Mar 2, 2006.

  1. Roland Riess

    Roland Riess Guest

    Hi all,

    as an absolute beginner with all web matters I'm sure there are still
    many things that I do net understand yet - so please point me to the
    right direction whereever you feel that I'm wrong.

    I developped a web service (VS 2003, ASP.NET1.1, IIS 5.0 on Windows
    2000) that does some database sync actions and which is called trough a
    WLAN connection from a pocket pc (VS 2003, C#). On my development pc
    everything is ok so far, I can connect and address the service which
    returns what it is expected to.

    My problem starts when I leave my development pc and install the web
    service on the target server (a machine with a different IP address,
    which should be standard for a web service): the proxy class of the
    consuming application (and I think this is nothing special for a pocket
    pc), which is created by adding the web reference to the targeted
    service was compiled with the IP of my development computer where the
    service was hosted during development - so it does not find the service
    on the target server. So I have to recompile the proxy class (say: the
    whole consuming app with the new IP) in order to be able to address the
    server. But can it be possible that I have to know the target IP address
    at compile time of my app? And furthermore that would mean that I would
    have to compile one particular application for each customer, as each of
    them runs the web service to be consumed on its own server with its own IP!?

    Where is the point where I am going wrong or don't know how do do things
    the way they are expected? Any help is appreciated!

    Oh, by the way: what files (and settings?) do I have to add to my web
    service setup project for that the service will run on the target
    machine? I'm still a little lost with all that.

    Thanks in advance.
    Roland Riess, Mar 2, 2006
    1. Advertisements

  2. Your web service proxy needs some dynamic settings, which can be read from
    web.config at runtime to tell it the URL of the webservice, so you dont have
    to recreate the app at deplyment time.

    Take a read of this

    Dont forget to install; the .net runtime on the server you are deploying the
    webservice onto.
    John Timney \( MVP \), Mar 2, 2006
    1. Advertisements

  3. Roland Riess

    Roland Riess Guest

    Hi John,

    Sometimes I wonder why I do not find such articles, or at least hints
    thereto, when searching the newsgroup archives before posting my
    question. But it is not always easy to find the proper key words to find
    or filter out the helping ones - like in this case.

    Anyway, you really helped me a lot, this is exactly what I needed to
    know, thank you!

    Roland Riess, Mar 2, 2006
  4. Roland,

    Your not alone. Unless you know what your looking for its often hard to
    determine the correct search terms. The guys who spend a lot of time in
    these groups are familiar with many of the questions new people come up
    with, so its a bit easier for us to point you in the right direction.

    Glad to have helped out.
    John Timney \( MVP \), Mar 2, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.