tags:

views:

30

answers:

1

I have two web site sites on IIS 7 (Default, Custom). Both Sites host the same web application.

Some of the web application behavior changes depending under what web site it is running. Is there a way for the web application to find out what is the name of the WebSite under which it is handling the current request.

Thank you Imran

+1  A: 
System.Web.Hosting.HostingEnvironment.SiteName

will get you the site name as it appears in IIS

Request.Url.Authority

will get yo the requesting url

Sruly
Awesome dude, thanks
imasud