?
Solved

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

Posted on 2013-05-27
1
Medium Priority
?
1,048 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

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

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

777 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