I have one set of code that powers 5 different websites. Because the code is licenced I am only allowed one installation per server. Each website uses a unique domain. The application automatically changes the branding information for each site, based on the domain name.

The application required sessions. Either cookies or cookie-less sessions may be used. The setting for this is in the web.config file.

There is only one web.config file that powers all five websites. I want some of the websites to use cookies and some of the websites to use cookie-less sessions.

Can this be done using a conditional in the web.config file?

Something like this?
Code:
<domain name="example.com">
    <system.web>
        <sessionState cookieless="UseUri" /> 
    </system.web>
</domain>
<domain name="mysite.com">
    <system.web>
        <sessionState cookieless="false" /> 
    </system.web>
</domain>
I use IIS 7.5.