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 / July 2005

Tip: Looking for answers? Try searching our database.

how to redirect a web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Reynolds - 08 Jul 2005 15:05 GMT
I support an application that runs on multiple service.  A CSS url is used to
call the web services - and it round robins each to the next server so there
is even distribution accross our servers.  Sometimes, based on the details in
the input parms, we may need to redirect the request to a different server.  
Does anyone have a C# code snipet that can be used to redirect a webservice
call to another server?  Or an MSDN library article.
Much thanks,Tim
Tim Reynolds - 08 Jul 2005 16:41 GMT
I am using this code snipet:
HttpWebRequest
myHttpWebRequest=(HttpWebRequest)WebRequest.Create(strTargetURL);    
                    myHttpWebRequest.MaximumAutomaticRedirections=1;
                    myHttpWebRequest.AllowAutoRedirect=true;
                    HttpWebResponse
myHttpWebResponse=(HttpWebResponse)myHttpWebRequest.GetResponse();

However, I can't seem to 'capture' what is in the myHttpWebResponse. It
keeps right on cruising past this code - but GetResponse is synchronize call
- so it should haev a value in it. Event when I breakpoint at next line in
code I still can't access myHttpWebResopnse.  Even if I could access it - I'm
not sure how to return it to the caller of this web service... Please
advise....
Thanks,
Tim

> I support an application that runs on multiple service.  A CSS url is used to
> call the web services - and it round robins each to the next server so there
[quoted text clipped - 3 lines]
> call to another server?  Or an MSDN library article.
> Much thanks,Tim
Chad Z. Hower aka Kudzu - 08 Jul 2005 21:06 GMT
=?Utf-8?B?VGltIFJleW5vbGRz?= <TimReynolds@discussions.microsoft.com>
wrote in news:D4DF50FA-68F0-42AB-99B1-611FBDF5DDFE@microsoft.com:
> I support an application that runs on multiple service.  A CSS url is
> used to call the web services - and it round robins each to the next

Ive never tried it, but a basic ASP.NET aspx page with a Redirect in it should do it.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
     "Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Pete Wood - 15 Jul 2005 22:05 GMT
Hi Tim...

Not sure what "specifically" your contraints are here do you want to:
a) Intercept the message (and redirect) as it reachs the target web service
b) Send the message to a different web service before it even reach the
"first"

a) is probably the easiest. When the message arrives at the web service,
you can simply invoke another one (which presumably is less busy!)

b) would involve an architectural change - you need to put in a "SOAP
router" infront of all your web services.   This essentially acts as a
"postman",  and just recieves the SOAP message, and forwards to the least
busy service. You can do SOAProuting via software or there is some neat
hardware (we've used) that does all this for you! :-)

Hope that helps!

Signature

Pete Wood
Contact me at  http://www.webserviceshelp.org  for more help
_________________________________________________________

>I support an application that runs on multiple service.  A CSS url is used
>to
[quoted text clipped - 8 lines]
> call to another server?  Or an MSDN library article.
> Much thanks,Tim

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.