James Bond
James Bond

Reputation: 35

Redirect WebService

I want to redirect my webservice A to another webservice B. So, i set the redirection in IIS. However, consumers of my webservice A get an error while accessing the webservice because they get a 302 message; and they dont handle it. I dont want to force all my consumers to change their code to handle this. I dont want to change my webmethods to make them a wrapper to call webservice B.

What are my options?

Upvotes: 1

Views: 2400

Answers (2)

Stephan Schinkel
Stephan Schinkel

Reputation: 5530

If you don't have the possibility to change the dns records you could write a webservice with the same signature that just calls your new webservice and returns the result of your new webservice.

Upvotes: 0

ChrisLively
ChrisLively

Reputation: 88044

Just trying to understand.

You have a new webservice. The old web service is being shut down. You want them same URL to go to the new webservice.

Are the two services hosted on the same box? Also, are the method's / interfaces the same between the two services?

If so, don't do an IIS level redirect. Instead, just bind the URL of the old service to the new service's IIS settings.

If not, then you need to tell your users that you are shutting down the old service, give them a time period on when it will happen that is long enough for them to make the appropriate changes. Then, on that day, turn the old service off.

Upvotes: 1

Related Questions