J
Jared
Hi
I have two web services running in different locations. I would like to
write some code to automatically fail over to the secondary if the
primary fails.
Rather than duplicating all my code I was hoping there was a simple way
to reference different type in a generic way. Is is possible to enter a
type as a string and convert it somehow?
My web services sit under the App_WebReferences folder. One is called
WebService1 and the other is called WebService2. Both have a service
called security with a number of methods. Both are currently referenced
using the following syntax;
WebService1.Security wsSec = new WebService1.Security();
This is wrapped in an if statement that uses an integer to determine
which one to use (I have already checked that the web services are
running as Session Start).
I want to be able to create a generic type which can reference either
web service. I don't want to have to wrap every piece of code that
references the web service in an if statement. This is made especially
difficult, as some of the web service methods use structs as well.
I have looked at delegates, but they only seem to work for methods.
Any help would be appreciated.
Thanks
Jared
I have two web services running in different locations. I would like to
write some code to automatically fail over to the secondary if the
primary fails.
Rather than duplicating all my code I was hoping there was a simple way
to reference different type in a generic way. Is is possible to enter a
type as a string and convert it somehow?
My web services sit under the App_WebReferences folder. One is called
WebService1 and the other is called WebService2. Both have a service
called security with a number of methods. Both are currently referenced
using the following syntax;
WebService1.Security wsSec = new WebService1.Security();
This is wrapped in an if statement that uses an integer to determine
which one to use (I have already checked that the web services are
running as Session Start).
I want to be able to create a generic type which can reference either
web service. I don't want to have to wrap every piece of code that
references the web service in an if statement. This is made especially
difficult, as some of the web service methods use structs as well.
I have looked at delegates, but they only seem to work for methods.
Any help would be appreciated.
Thanks
Jared