Monday, March 21, 2016

Web config transform on microsoft.identityModel - 'http://schemas.microsoft.com/XML-Document-Transform' attribute is not declared

Problem:

Have my claims aware MVC app humming right along.  Now I wanted to get it to deploy easily between dev and staging.  I tried to use Web.config transform but could not get the Microsoft.IdentityModel elements to transform.  Appears that the namespace (
xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform) and visual studio 2013 don't play nice together.


Solution:

Fortunately, I am not the first to run into this issue.  Fix is easy


<audienceUris>

<add xdt:Transform="RemoveAll"/>

<add value=https://realm/mine xdt:Transform="Insert"/>

</audienceUris>




Drop the existing key in the audienceUris, Removeall.  Then add in the value that you need using the Insert.


Source:

  1. http://stackoverflow.com/questions/8513488/web-config-transform-on-microsoft-identitymodel-http-schemas-microsoft-com
  2. http://blogs.catapultsystems.com/rswitzer/archive/2013/08/05/web-config-transforms-for-identity-model/

No comments:

Post a Comment