IIS 7.5: Conditionals in web.config based on domain name

I use IIS 7.5.  I have one set of code that powers 5 different websites.  Each website uses a unique domain.  The application automatically changes the branding information for each site, based on the domain name.  It is a commercial application and I only have one licence so I cannot break this out into two sets of directories.

Some of the sites must run using cookies for sessions and some of the websites must run without cookies.

Is there any way to have conditional statements in the web.config file based on the domain name?

Something like this?
<domain name="example.com">
        <sessionState cookieless="UseUri" /> 
<domain name="mysite.com">
        <sessionState cookieless="false" /> 

Open in new window

LVL 16
Who is Participating?
All Courses

From novice to tech pro — start learning today.