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