[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2013-05-27
1
Medium Priority
?
1,101 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 2000 total points
ID: 39200275
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month20 days, 11 hours left to enroll

865 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