Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8627185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:12:49+00:00 2026-06-12T08:12:49+00:00

How does one go about transforming the audienceUris and federatedAuthentication elements in the microsoft.identitymodel

  • 0

How does one go about transforming the audienceUris and federatedAuthentication elements in the microsoft.identitymodel configuration section using the standard visual studio web.config transforms?

For the development environment, we have all the subdomains postfixed with a ‘-dev’ along with special localhost port numbers, for example: realm=”https://client-dev.domain.com:444″. Today the main web.config reflects this but ideally we would like to move this setting to Web.Debug.config and in the Web.Release.config we would like to specify the proper audience and realms sans the ‘-dev’ postfix and the local port settings. However, attempting to put xdt:Transform=”Replace” in the microsoft.identitymodel element inside the Web.Debug.Config results in this warning:

The 'http://schemas.microsoft.com/XML-Document-Transform:transform' attribute is not declared.

and of course runtime failures (not being able to find servicecertificate for example).

Here’s the microsoft.identitymodel sections:

<configuration>
  <configSections>
    <section name="microsoft.identityModel" type="Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </configSections>

  <microsoft.identityModel>
    <service>
      <applicationService>
        <claimTypeRequired>
          <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier" optional="false" />
          <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" optional="false" />
        </claimTypeRequired>
      </applicationService>
      <serviceCertificate>
        <certificateReference x509FindType="FindByThumbprint" findValue="NNNNNNNNNN" storeLocation="LocalMachine" storeName="My" />
      </serviceCertificate>
      <certificateValidation certificateValidationMode="None" />
      <audienceUris>
        <add value="https://url/" />
      </audienceUris>
      <federatedAuthentication>
        <wsFederation passiveRedirectEnabled="true" issuer="https://url/" realm="https://url/" requireHttps="true" />
        <cookieHandler requireSsl="true" />
      </federatedAuthentication>
      <issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
        <trustedIssuers>
          <add thumbprint="NNNNNNNNNN" name="https://url/" />
        </trustedIssuers>
      </issuerNameRegistry>
    </service>
  </microsoft.identityModel>
<configuration>

Existing solutions that don’t work:

1) Same issue was raised here but no proper response. The RemoveAll and Insert doesn’t work:
Web config transform on microsoft.identityModel – 'http://schemas.microsoft.com/XML-Document-Transform&#39; attribute is not declared

2) Also, tried to manipulate the namespace as suggested on this thread and this doesn’t work either:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/9ededb66-3e34-4bba-8e20-a2cc6025f0f9

3) configSource looked promising but again does work when specified in the microsoft.identitymodel element.
I get:

Warning 1   The 'configSource' attribute is not declared.

http://blog.andreloker.de/post/2008/06/16/Keep-your-config-clean-with-external-config-files.aspx

Any help will be appreciated! Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:12:50+00:00Added an answer on June 12, 2026 at 8:12 am

    After a lot of trial and error, I resorted to using XMLPreProcess by Loren Halvorson to auto-generate the correct Web.config from a TemplateWeb.config as part of the pre-Build event for each project.

    Although I would have liked Visual Studio’s attempt at this to work for developers, alas, time is of money and its time for me to move on. Needless to say, it’s broken in the SQL Azure SDK as well because the transforms only occured when you publish a site. In the latest Azure SDK, that is no longer the case and hence transforms stopped working as well. Oh joy!

    Here’s a link to the excellent tool, I think, a must-have for every ASP.NET developer:

    http://xmlpreprocess.codeplex.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How does one go about catching exceptions from using controls in markup? For example,
How does one go about renaming an XML element using REXML or another Ruby
How does one go about properly analyzing the requirements of a client in terms
I was curious as to how does one go about finding undocumented APIs in
In jQuery, how does one go about finding all the 'unchecked' checked boxes. $(':checkbox:checked');
Does any one know about opensource network monitor tool for BlackBerry ?
i am getting this error does some one knows about it??? 2009-07-08 18:42:36.778 FlashCards[1297:20b]
How does one go about attaching a bunch of code to an onkeydown event,
How does one go about adding JButton s among various other Swing GUI components
how does one go about accessing a decorator from a base class in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.