Redirecting an ASMX page to a new server

Discussion in 'ASP .Net Web Services' started by Simon960, Jan 10, 2007.

  1. Simon960

    Simon960 Guest

    Hi,

    I wonder if someone would help me please? I am trying to redirect a
    ..NET web service ASMX page to a new server (from
    https://localhost/webservices/syncdata.asmx for test) to
    https://vault1.secured-url.com/fundamentumfais/webservices/syncdata.asmx)
    so that my VB .NET standalone client app connects to the new server. I
    can not change the standalone app as it is in use in several locations
    around the country and I can't change them all on the same day (so data
    would be split across two DBs, etc).

    I have created a redirect on IIS for the folder webservices on the test
    server redirecting to:
    https://vault1.secured-url.com/fundamentumfais/webservices$S$Q and
    ticked "exact URL above" and this seems to work fine in a browser.

    If I type in
    https://localhost/webservices/syncdata.asmx?op=GetChangedTableData then
    it redirects to
    https://vault1.secured-url.com/fundamentumfais/webservices/syncdata.asmx?op=GetChangedTableData
    and it seems fine. However if I run my standalone VB app it gives an
    error. I'm afraid I can't be more specific on the error because it
    just gives me a friendly error "Communications Error".

    By changing the client app's configuration file I can set it to connect
    directly to https://vault1.secured-url.com/fundamentumfais/webservices/
    (the app itself completes the rest of the URL, because it uses a couple
    of web services) and that works perfectly so its not a network/
    password issue or anything along those lines.

    Is there some reason why asmx pages can't redirected in this way? As I
    said its strange that it seems to work fine in a browser, but then I'm
    new to .NET and I'm not a developer. Is there an easy way to make this
    redirect work in code? I'm not a coder but I could certainly open a
    file and stick a server.redirect or something at the top of it :)

    Many thanks indeed for any help offered

    Simon
    spdale A T gmail.com
     
    Simon960, Jan 10, 2007
    #1
    1. Advertising

  2. Simon960

    Andrew Brook Guest

    just a guess -
    When a redirect is performed, the HTTP response to the client contains the
    new address to visit, it is then the clients responsibility to request the
    new URL. I would think that in your tests, the browser handles the redirect
    for you so it looks like it works. Your VB client on the other hand is not
    expecting the redirect and does not handle it. Not sure how you could fix
    this though without changing the client, what you're essentially after is
    the equivlent of a server.transfer in your service...

    Andrew

    "Simon960" <> wrote in message
    news:...
    > Hi,
    >
    > I wonder if someone would help me please? I am trying to redirect a
    > .NET web service ASMX page to a new server (from
    > https://localhost/webservices/syncdata.asmx for test) to
    > https://vault1.secured-url.com/fundamentumfais/webservices/syncdata.asmx)
    > so that my VB .NET standalone client app connects to the new server. I
    > can not change the standalone app as it is in use in several locations
    > around the country and I can't change them all on the same day (so data
    > would be split across two DBs, etc).
    >
    > I have created a redirect on IIS for the folder webservices on the test
    > server redirecting to:
    > https://vault1.secured-url.com/fundamentumfais/webservices$S$Q and
    > ticked "exact URL above" and this seems to work fine in a browser.
    >
    > If I type in
    > https://localhost/webservices/syncdata.asmx?op=GetChangedTableData then
    > it redirects to
    > https://vault1.secured-url.com/fundamentumfais/webservices/syncdata.asmx?op=GetChangedTableData
    > and it seems fine. However if I run my standalone VB app it gives an
    > error. I'm afraid I can't be more specific on the error because it
    > just gives me a friendly error "Communications Error".
    >
    > By changing the client app's configuration file I can set it to connect
    > directly to https://vault1.secured-url.com/fundamentumfais/webservices/
    > (the app itself completes the rest of the URL, because it uses a couple
    > of web services) and that works perfectly so its not a network/
    > password issue or anything along those lines.
    >
    > Is there some reason why asmx pages can't redirected in this way? As I
    > said its strange that it seems to work fine in a browser, but then I'm
    > new to .NET and I'm not a developer. Is there an easy way to make this
    > redirect work in code? I'm not a coder but I could certainly open a
    > file and stick a server.redirect or something at the top of it :)
    >
    > Many thanks indeed for any help offered
    >
    > Simon
    > spdale A T gmail.com
    >
     
    Andrew Brook, Jan 10, 2007
    #2
    1. Advertising

  3. Simon960

    RYoung Guest

    you should try configuring the localhost service with WSE3 and following the
    "routing" tutorial. There's a sample called "Permiter Service Router" which
    does exactly what you describe.

    It allows the client to think it's communicating with the localhost (or
    whatever it's referencing), and that service will in turn forward the
    request to a different server. The diferent server either responds back to
    the contacting server, or to the client directly (can't remember which).

    But, if you do that, the client app won't need any changes. It's not
    difficult to do. Just get the WSE3 extenstions from msdn.microsoft.com, then
    check out the documenting for "routing", also go to the Patterns & Practices
    section at MSDN and look for web services patterns, where it describes the
    "Permiter Service Router".

    Ron

    "Simon960" <> wrote in message
    news:...
    > Hi,
    >
    > I wonder if someone would help me please? I am trying to redirect a
    > .NET web service ASMX page to a new server (from
    > https://localhost/webservices/syncdata.asmx for test) to
    > https://vault1.secured-url.com/fundamentumfais/webservices/syncdata.asmx)
    > so that my VB .NET standalone client app connects to the new server. I
    > can not change the standalone app as it is in use in several locations
    > around the country and I can't change them all on the same day (so data
    > would be split across two DBs, etc).
    >
    > I have created a redirect on IIS for the folder webservices on the test
    > server redirecting to:
    > https://vault1.secured-url.com/fundamentumfais/webservices$S$Q and
    > ticked "exact URL above" and this seems to work fine in a browser.
    >
    > If I type in
    > https://localhost/webservices/syncdata.asmx?op=GetChangedTableData then
    > it redirects to
    > https://vault1.secured-url.com/fundamentumfais/webservices/syncdata.asmx?op=GetChangedTableData
    > and it seems fine. However if I run my standalone VB app it gives an
    > error. I'm afraid I can't be more specific on the error because it
    > just gives me a friendly error "Communications Error".
    >
    > By changing the client app's configuration file I can set it to connect
    > directly to https://vault1.secured-url.com/fundamentumfais/webservices/
    > (the app itself completes the rest of the URL, because it uses a couple
    > of web services) and that works perfectly so its not a network/
    > password issue or anything along those lines.
    >
    > Is there some reason why asmx pages can't redirected in this way? As I
    > said its strange that it seems to work fine in a browser, but then I'm
    > new to .NET and I'm not a developer. Is there an easy way to make this
    > redirect work in code? I'm not a coder but I could certainly open a
    > file and stick a server.redirect or something at the top of it :)
    >
    > Many thanks indeed for any help offered
    >
    > Simon
    > spdale A T gmail.com
    >
     
    RYoung, Jan 13, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John
    Replies:
    6
    Views:
    667
  2. Craig G
    Replies:
    1
    Views:
    464
    William F. Robertson, Jr.
    Dec 6, 2004
  3. Bill Davidson
    Replies:
    5
    Views:
    695
    Bill Davidson
    Sep 12, 2006
  4. moondaddy

    Not debugging into asmx page

    moondaddy, Sep 20, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,583
    moondaddy
    Sep 20, 2006
  5. Oriane

    [IIS 7.0]Handler for asmx page ?

    Oriane, Jun 18, 2007, in forum: ASP .Net
    Replies:
    7
    Views:
    820
    Oriane
    Jun 19, 2007
Loading...

Share This Page