Solved

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

Posted on 2013-05-27
1
995 Views
Last Modified: 2013-05-30
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">
    <system.web>
        <sessionState cookieless="UseUri" /> 
    </system.web>
</domain>
<domain name="mysite.com">
    <system.web>
        <sessionState cookieless="false" /> 
    </system.web>
</domain>

Open in new window

0
Comment
Question by:hankknight
1 Comment
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 500 total points
ID: 39200275
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Please explain the parts of these 2 LINQ expressions 3 53
Run ColdFusion website locally 1 31
Testing of the web services 1 32
ASP.NET MVC - Views 3 18
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question