Solved

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

Posted on 2013-05-27
1
1,026 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 500 total points
ID: 39200275
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

705 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