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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    867
  2. William Gower
    Replies:
    1
    Views:
    469
    Kevin Spencer
    Jul 27, 2004
  3. bienwell
    Replies:
    1
    Views:
    2,932
    =?Utf-8?B?U3RldmUgQy4gT3Jy?=
    Feb 23, 2006
  4. =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==

    Redirecting to a New Page Returns ASP_SMARTNAV_RDIR

    =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==, Jan 16, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    632
    =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==
    Jan 16, 2007
  5. Martin Arvidsson, Visual Systems AB

    Q: Getting values when redirecting to a new page...

    Martin Arvidsson, Visual Systems AB, Apr 3, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    361
    Cowboy \(Gregory A. Beamer\)
    Apr 3, 2008
  6. Guest
    Replies:
    4
    Views:
    585
    Guest
    Oct 9, 2008
  7. Redirecting to a new page

    , Apr 5, 2006, in forum: Javascript
    Replies:
    1
    Views:
    116
    Thomas 'PointedEars' Lahn
    Apr 6, 2006
  8. Replies:
    2
    Views:
    786
    Thomas 'PointedEars' Lahn
    Mar 11, 2008
Loading...