1

I have a WCF webservice that run under a domain account . I use powershell to deploy a webapplication that host the service on 4 different platforms (development, systemtest, usertest, production).On every platform we have a domain account that we use to run both wcf webservice UPN and apppool under. In my deployment script i remove and create the webapplication and apppool. I can change apppool account by powershell depends on platform but how to change or override identity that is in web.config ? is there a powershell command that can override wcf identity? Any help will be appreciated.

Nokomo
  • 31
  • 1

1 Answers1

0

Usually you'd use config transformations for these environment-specific manipulations.

In your case, your transformed web.config (e.g. web.usertest.config) could look like the following:

<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    <system.serviceModel>
        <client>
            <endpoint>
                <identity>
                    <userPrincipalName value="foo@bar.com" xdt:Transform="Replace" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>
Jan Köhler
  • 5,817
  • 5
  • 26
  • 35