Skip to content

Deploying one or more OpenRasta applications under IIS7.5 under an existing site

bchavez edited this page Feb 11, 2012 · 8 revisions

I believe it is very similar for IIS7.

I had a goal of creating a web service to exist under an existing domain "mydomain.com". I wanted to be able to deploy more than one version at a time to allow clients to delay migration to a newer version if development constraints allowed for it.

I do not claim this is the best way to do this, but it works and allows me to have more than one version of the webservice deployed under a given site.

The existing site "mydomain.com" was published to our web server at path

"C:\websites\mydomain.com"

I had created an OpenRasta application with a resource configured

AtUri "/sites"

I wanted to make the webservice available at "mydomain.com/ws/v1/sites" As an example a 2nd version of the webservice available at "mydomain.com/ws/v2/sites"

To achieve this i created the following folders on the web server.

"C:\websites\mydomain.com\ws"
"C:\websites\mydomain.com\ws\v1"
"C:\websites\mydomain.com\ws\v2"

I then published my application to the following on the web server

"C:\websites\mydomain.com\ws\v1"
"C:\websites\mydomain.com\ws\v2"

As this is an example I deployed the same application to the "v1" and "v2" folders I created. There is no reason I could not have modified the application and deployed something different to "v2" folder.

Using IIS Manager

  • Convert the folder "v1" to an application and selected "ASP .Net 4" as the application pool.
  • Convert the folder "v2" to an application and selected "ASP .Net 4" as the application pool.

This gave me two deployed copies of the webservice given the paths.

There is no reason you couldnt deploy multiple applications this way with appropriate paths that make sense for the applications and web sites. I originally did not realise that the OpenRasta AtUri paths were relative to the application URI. This is probably due to my small amount of experience with ASP.Net or the URI routing features of it.