Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / January 2007

Tip: Looking for answers? Try searching our database.

Redirecting an ASMX page to a new server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon960 - 10 Jan 2007 02:28 GMT
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=GetC
hangedTableData

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 - 10 Jan 2007 16:30 GMT
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

> Hi,
>
[quoted text clipped - 36 lines]
> Simon
> spdale A T gmail.com
RYoung - 13 Jan 2007 20:14 GMT
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

> Hi,
>
[quoted text clipped - 36 lines]
> Simon
> spdale A T gmail.com

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.