views:

26

answers:

3

I have a set of web services written in classic asp. I want to convert them to asp.net, but this will be a long process. I want to convert a couple functions at a time, and use some sort of routing mechanism to select which version the requests go to (classic asp, or asp.net).

Changing the url used to access the web service and functions is out of the question.

The function to use is defined by a parameter in the querystring.

It seems I cannot use Server.Transfer to go from asp.net to asp or vice-versa.

Anyone have suggestions?

A: 

Hi,

Not sure but have you considered some sort of proxy server (apache mod proxy or squid etc) to re-route a request at one url to a different url possibly on a different server? You should be able to configure the proxy to redirect one or many of your service calls to either asp or asp.net implementations on the same or different servers.

Enjoy!

Doug
This is along the lines of what I was thinking. But, for IIS/Microsoft servers. I'm looking into url rewrite currently, which looks promising.
aepheus
I have used apache on windows. So put up separate proxy server and host one of those apps on it redirecting to your app server(s)
Doug
A: 

You could create a wrapper Web Service.

Compile your current classic asp (and the asp.net web service you wish to convert to) using new namespaces. Say your current asp web service is called "MyWebService"...compile it into MyWebServiceAspClassic and the newly converted web service into "MyWebServiceAspNet".

Compile a completely new Web Service (MyWebServiceWrapper) using the current URL you mention above. Then, reference the 2 newly compiled MyWebService's in your wrapper WebService. Then you can use the QueryString parameter to decide which referenced web service to use. Whew! Make sense?

MikeTWebb
+1  A: 

If everything is going to run in the same server (IIS 7) you can use URL Rewrite to simply use regular expressions or a map (table) to do that: http://www.iis.net/download/URLRewrite

This way your URLs will not need to change, you will not need any extra servers or additional "proxy software", just extremely fast early rewriting (for those familiar with apache, is like mod_rewrite).

If you need to FW to a separate server (ie you need a reverse/forward proxy) your best option is to use Application REquest Routing (http://www.iis.net/download/ApplicationRequestRouting) which actually uses URL rewrite capabilities to have very flexible routing mechanisms, and with extreme performance, and advanced features like kernel mode caching and disk caching.

CarlosAg