Sunday

Virtual Subdomains on IIS7

I have been googling on net to find out how to generate virtual subdomains for my application which hosted on IIS7 and developed with ASP.net, but could not find a appropriate information.

What do i mean Virtual sub domains?

1. when user types http://subdomain.DomainName.com it should get hit your server and
2. Rewrites/redirects to formatted url based on the rules set in URL Rewrite module in IIS7 ( say will redirect to http://DomainName.com?userid=Anysubdoamin)

To accomplish the point 1 mentioned above, you need to set the wild card DNS entries on DNS name server for the sub domains. This will ensure that what ever the sub domain name you give will hit the server.

To accomplish the point 2, you need to use the url rewirte module and need write the rules to transform the sub domain into ASP.net engine understandable format.