TechNet
Products
IT Resources
Downloads
Training
Support
Products
Windows
Windows Server
System Center
Microsoft Edge
Office
Office 365
Exchange Server
SQL Server
SharePoint Products
Skype for Business
See all products »
Resources
Channel 9 Video
Evaluation Center
Learning Resources
Microsoft Tech Companion App
Microsoft Technical Communities
Microsoft Virtual Academy
Script Center
Server and Tools Blogs
TechNet Blogs
TechNet Flash Newsletter
TechNet Gallery
TechNet Library
TechNet Magazine
TechNet Wiki
Windows Sysinternals
Virtual Labs
Solutions
Networking
Cloud and Datacenter
Security
Virtualization
Updates
Service Packs
Security Bulletins
Windows Update
Trials
Windows Server 2016
System Center 2016
Windows 10 Enterprise
SQL Server 2016
See all trials »
Related Sites
Microsoft Download Center
Microsoft Evaluation Center
Drivers
Windows Sysinternals
TechNet Gallery
Training
Expert-led, virtual classes
Training Catalog
Class Locator
Microsoft Virtual Academy
Free Windows Server 2012 courses
Free Windows 8 courses
SQL Server training
Microsoft Official Courses On-Demand
Certifications
Certification overview
Special offers
MCSE Cloud Platform and Infrastructure
MCSE: Mobility
MCSE: Data Management and Analytics
MCSE Productivity
Other resources
Microsoft Events
Exam Replay
Born To Learn blog
Find technical communities in your area
Azure training
Official Practice Tests
Support options
For business
For developers
For IT professionals
For technical support
Support offerings
More support
Microsoft Premier Online
TechNet Forums
MSDN Forums
Security Bulletins & Advisories
Not an IT pro?
Microsoft Customer Support
Microsoft Community Forums
Sign in
Home
Library
Wiki
Learn
Gallery
Downloads
Support
Forums
Blogs
Resources For IT Professionals
United States (English)
Россия (Pусский)
中国(简体中文)
Brasil (Português)
Skip to locale bar
Editing: Windows Identity Foundation (WIF) Questions and Answers
Wiki
>
TechNet Articles
>
Windows Identity Foundation (WIF) Questions and Answers
Article
Edit
History
Title
<html> <body> <p><strong>Index of the question answered in this article</strong><br> <br> <span style="font-weight:bold"></span></p> <p><span style="font-size:16px"><strong>Volume 4</strong></span></p> <ul> <li><span style="font-size:13px"><strong><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#V4Q01">Q: How do I configure a WIF Relying Party application using a configuration file?</a></strong></span> </li></ul> <span style="font-weight:bold; font-size:16px">Volume 3</span> <ul> <li><span style="font-family:arial; font-size:13px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q1">Q: I am getting the following error when I run my web app: <span style="font-size:12px">ID4014: A SecurityTokenHandler is not registered to read security token ...</span></a><span style="font-size:12px"></span><span style="font-size:12px"></span></span> </li><li><span style="font-size:12px; font-family:arial"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q2"><span style="font-size:13px">Q: <span style="line-height:15px; font-size:13px">Are bootstrap tokens, from the CurrentPrinciples IClaimsPrincle identities[0], encrypted?</span></span></a><span style="line-height:15px; font-size:12px; font-family:arial"></span><span style="line-height:15px; font-size:12px; font-family:arial"></span></span> </li><li><span style="font-family:arial; font-size:13px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q3">Q: <span style="line-height:15px; font-size:14px">How can I get entire token XML from Saml2SecurityToken object?</span></a><span style="line-height:15px; font-size:14px"></span><span style="line-height:15px; font-size:14px"></span></span> </li><li><span style="line-height:15px; font-size:14px; font-family:arial"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q4">Q: <span style="line-height:15px; font-size:14px; font-family:arial">What is KeyIdentifier used for?</span></a><span style="line-height:15px; font-size:14px; font-family:arial"></span><span style="line-height:15px; font-size:14px; font-family:arial"></span></span> </li><li><span style="line-height:15px; font-size:14px; font-family:arial"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q5">Q: <span style="line-height:15px; font-size:14px; font-family:arial">Does WIF support federated authentication over webHttpBinding for RESTful WCF endpoints?</span></a><span style="line-height:15px; font-size:14px; font-family:arial"></span><span style="line-height:15px; font-size:14px; font-family:arial"></span></span> </li><li><span style="line-height:15px; font-size:14px; font-family:arial"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q6">Q: <span style="line-height:15px; font-size:14px; font-family:arial">How do I create a custom security token on server side and provide it to client from method call?</span><span style="line-height:15px; font-size:14px; font-family:arial"> </span></a><span style="line-height:15px; font-size:14px; font-family:arial"></span></span> </li><li><span style="line-height:15px; font-size:14px; font-family:arial"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q7">Q: How can I <span style="line-height:15px; font-size:14px; font-family:arial">encrypt the message with my own private/public keys?</span></a><span style="line-height:15px; font-size:14px; font-family:arial"></span><span style="line-height:15px; font-size:14px; font-family:arial"></span></span> </li><li><span style="line-height:15px; font-size:14px; font-family:arial"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q8">Q: <span style="line-height:15px; font-size:14px; font-family:arial">How do I connect Windows 2003 AD FS with PingIdentity using SAML or WSFed?</span></a><span style="line-height:15px; font-size:14px; font-family:arial"></span><span style="line-height:15px; font-size:14px; font-family:arial"></span></span> </li><li><span style="line-height:15px; font-size:14px; font-family:arial"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q9">Q: <span style="line-height:15px; font-size:14px; font-family:arial">Where is the guidance on how to move my application to a production server?</span></a><span style="line-height:15px; font-size:14px; font-family:arial"></span><span style="line-height:15px; font-size:14px; font-family:arial"></span></span> </li><li><span style="line-height:15px; font-size:14px; font-family:arial"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q10">Q: <span style="line-height:15px; font-size:15px; font-family:calibri,sans-serif">What is the difference between Microsoft.IdentityModel and System.IdentityModel?</span></a></span> </li></ul> <span style="font-weight:bold; font-size:16px">Volume 2</span> <ul> <li><strong><span style="font-weight:normal; font-family:arial; font-size:13px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v2q1">Q: How can I control the type of token my STS issues when it is invoked from an active or passive client?</a></span></strong> </li><li><span style="font-weight:normal; font-family:arial"><strong><span style="line-height:14px; font-weight:normal; font-size:13px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v2q2">Q: What event trigger should I use to signal the time for population of session variables?</a></span></strong></span> </li><li><span style="line-height:14px; font-weight:normal; font-family:arial; font-size:13px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v2q3">Q: How do I tell AD FS v2.0 which Claims Provider the application is trying to connect with from within the web application?</a></span> </li><li><span style="line-height:14px; font-weight:normal; font-family:arial; font-size:13px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v2q4">Q: Is there a way for my application to query a third party STS to get a list of all users that are at least 21 years or older?</a></span> </li><li><span style="line-height:15px; font-weight:normal; font-family:arial; font-size:13px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v2q5"><span style="line-height:125%; font-size:13px"></span><span style="line-height:125%; font-size:13px">Q: </span><span style="line-height:125%; font-size:13px">How do I configure WIF’s behavior so a user can navigate to a given page, then click ‘login’ to go to an authentication page?</span></a><span style="line-height:125%; font-size:13px"></span></span> </li><li><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q2.6"><span style="font-size:13px">Q: What security consideration should I take when developing and deploying claims aware applications?</span></a> </li><li><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q2.7"><span style="font-size:13px">Q: Does WIF support OAuth 2.0?</span></a> </li><li><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q2.8"><span style="font-size:13px">Q: How to configure token replay detection in configuration file?</span></a> </li><li><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q2.9"><span style="font-size:13px">Q: What Code Samples are available for WIF?</span></a> </li><li><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q2.10"><span style="font-size:13px">Q: Can I configure SSO with Active Directory for Web Application deployed to Windows Azure? </span></a> </li></ul> <div><span style="line-height:16px; font-size:13px"><strong><span style="font-size:16px">Volume 1</span></strong></span></div> <ul> <li><span style="font-size:13px"><span style="line-height:125%; font-weight:normal; font-family:arial; font-size:13px"></span><strong><span style="font-family:arial; font-size:13px; color:#0070c0"><a shape="rect" href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q1">Q: I am getting exception with the following message after deploying my application to a farm: "Key not valid for use in specified state"</a>?</span></strong></span> </li><li><span style="font-size:13px"><strong><span style="font-family:arial; font-size:13px; color:#0070c0"></span></strong><strong><span style="font-family:arial; font-size:13px; color:#0070c0"><a shape="rect" href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q2">Q: I am getting exception: "Configuration Error...Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive."</a></span></strong></span> </li><li><span style="font-size:13px"><strong><span style="font-family:arial; font-size:13px; color:#0070c0"></span></strong><strong><span style="font-family:arial; font-size:13px; color:#0070c0"><a shape="rect" href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q3">Q: I am getting exception: "A potentially dangerous Request.Form value was detected from the client (wresult="<t:RequestSecurityTo...")."</a></span></strong></span> </li><li><span style="font-size:13px"><strong><span style="font-family:arial; font-size:13px; color:#0070c0"></span></strong><strong><span style="font-family:arial; font-size:13px; color:#0070c0"><a shape="rect" href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q4">Q: What are the options for implementing authorization in claims aware application?</a></span></strong></span> </li><li><span style="font-size:13px"><strong><span style="font-family:arial; font-size:13px; color:#0070c0"></span></strong><strong><span style="font-family:arial; font-size:13px; color:#0070c0"><a shape="rect" href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q5">Q: I am receiving exception with the following message: "The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating."</a></span></strong></span> </li><li><span style="font-size:13px"><strong><span style="font-family:arial; font-size:13px; color:#0070c0"><a shape="rect" href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q5"></a></span></strong><span style="font-family:arial; font-size:13px; color:#0070c0"><strong><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#q6" style="line-height:115%; font-size:10pt">Q: I am getting the following error when I updated with new <em>stsServer</em> certificate and changed the Web.config to point to new</a> </strong><strong><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#q6" style="line-height:115%; font-size:10pt">trusted certificate.</a></strong></span></span> </li><li><span style="font-size:13px"><span style="line-height:115%; font-family:arial; font-size:13px; color:#0070c0"></span><span style="line-height:115%; font-family:arial; font-size:13px; color:#0070c0"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q7" style="line-height:115%; font-size:10pt">Q: I am getting the following error when installing the WIF 4.0 SDK - Error: 2738.</a> What does this mean?</span></span> </li><li><span style="font-size:13px"><span style="font-size:13px; color:#00b0f0"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q8"><span style="line-height:115%; font-family:arial; font-size:13px"></span><span style="font-family:arial; font-size:13px"><span style="font-size:13px">Q: I am getting the following exception - </span><span style="line-height:18px; font-size:13px">An error occurred during processing of the request.</span></span></a> </span><span style="font-size:13px; color:#0070c0">What does it mean?</span></span> </li><li><span style="font-family:arial; font-size:13px; color:#0070c0"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q9">Q:</a><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q9"> How do I get an email address claim from ACS v2?</a></span> </li><li><span style="font-size:13px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#Q11"><span style="font-family:arial; font-size:13px; color:#0070c0"></span><span style="font-family:arial; font-size:13px; color:#0070c0">Q: My application uses WIF and requires that it be installed as a prerequisite. Can I distribute the runtime files with my application?</span></a></span> </li></ul> <span></span> <p><span><strong>______________________________________________________________________________________________________________________________________________________________________________</strong><br> <br> <strong>Following are the questions and the answers.<br> <br> </strong><br> <span style="line-height:16px"><strong><span style="font-weight:bold; font-size:14px"><a name="Vol 4 - top"></a>Volume 4<br> </span></strong></span><span style="color:#0066dd"><strong><br> <span style="font-size:14px; font-family:arial"><strong><a name="V4Q01"><strong>Q</strong></a></strong>: </span></strong></span><span style="font-weight:bold; font-size:15px; font-family:arial"><strong><span style="text-decoration:none; font-size:14px"><strong><span style="text-decoration:none; font-weight:bold; line-height:16px; font-size:14px"><a href="http://social.technet.microsoft.com/wiki/contents/articles/1898/edit.aspx#v3q1" style="text-decoration:none; font-weight:bold; font-size:14px; line-height:16px"><span style="color:#262626">How do I configure a WIF relying party application using a configuration file?</span></a><br> </span></strong></span></strong></span><span style="font-size:14px; font-family:arial"><strong><span style="font-size:14px"><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong></strong></strong></span></strong></strong></span></strong></strong></span></strong></strong></span></strong></span></strong></span></span></p> <p style="text-decoration:none; display:inline!important"><span style="font-size:14px; font-family:arial"><strong><span style="font-size:14px"><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><span style="line-height:16px; text-decoration:none; font-size:14px; color:#3f3f3f"><span style="font-size:14px; color:#3f3f3f"><a target="_blank" href="http://msdn.microsoft.com/en-us/library/gg607699.aspx"><span style="font-size:14px; color:#3f3f3f"><span style="font-weight:bold; font-size:14px">A: </span><span style="font-size:14px">There is a new topic on MSDN that completely describes the WIF Configuration file, its various components and usage examples. </span></span></a><span style="font-size:14px"></span></span><span style="font-size:14px"></span></span></strong></span></strong></strong></span></strong></strong></span></strong></strong></span></strong></strong></span></strong></span></strong></span></p> <span style="font-size:14px; font-family:arial"><strong><span style="font-size:14px"><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong><span style="font-size:14px"><strong><strong></strong></strong></span></strong></strong></span></strong></strong></span></strong></strong></span></strong></span></strong></span><span style="line-height:16px"><span style="font-size:14px; font-family:arial"><span style="font-size:14px">See - </span><a href="http://msdn.microsoft.com/en-us/library/gg607699.aspx" style="font-size:14px">http://msdn.microsoft.com/en-us/library/gg607699.aspx</a></span><strong style="font-size:14px; font-family:arial"> </strong></span> <span style="font-family:arial"><strong><br> </strong></span><span style="line-height:16px; font-weight:bold; font-size:14px">Volume 3</span> <p><span style="font-size:13px"></span></p> <p><span style="font-size:13px"><span style="font-family:arial; font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q1" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: </strong><strong><span style="font-family:arial; font-size:13px">When I ran the web app it errored out as follows, how do I fix this?</span><br> <span style="font-family:arial; font-size:13px">ID4014: A SecurityTokenHandler is not registered to read security token ('BinarySecurityToken', 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd').</span><br> <span style="font-family:arial; font-size:13px">I created a relying party in ACS and used SWT as the token format. Then I used "Add STS reference..." to my web app and pointed it to https://MyApp.accesscontrol.appfabriclabs.com/FederationMetadata/2007-06/FederationMetadata.xml. </span><br> <span style="font-family:arial; font-size:13px">If I switched to use SAML 2.0 token format, it works just fine.<br> </span></strong></span><span style="font-family:arial"><strong style="font-weight:bold">A</strong><strong>: </strong>WIF does not include a security token handler for SWT. You can find a sample here: http://zamd.net/2010/07/31/using-wif-for-securing-rest-service/</span></span></p> <span style="font-family:arial; font-size:13px"> <p><span style="font-size:13px">I wouldn't put too many bets on SWT - seems it will soon be replaced by JWT (of course the good thing about WIF is, that these details are abstracted away from an application point of view).</span><br> <br> <span style="font-family:arial; font-size:13px"><span style="line-height:15px; font-weight:normal; text-decoration:none; font-family:calibri,sans-serif; font-size:13px; color:#ff6600"></span><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/2e6cfeae-f20d-4a9b-895d-3885b909f79f"><span style="line-height:15px; font-weight:normal; text-decoration:none; font-family:calibri,sans-serif; font-size:13px; color:#ff6600"></span></a><span style="line-height:15px; font-weight:normal; text-decoration:none; font-family:calibri,sans-serif; font-size:13px; color:#ff6600"><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/98eff512-0bf0-4da4-8d93-f1dbadeb0ed6" style="color:#ff6600; font-weight:normal; text-decoration:none"><span style="line-height:15px; font-size:13px">View article...</span></a></span> </span></p> </span> <p><span style="line-height:15px; font-family:calibri,sans-serif; font-size:13px"><span style="font-family:arial; font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q2" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: Are bootstrap tokens, from the CurrentPrinciples IClaimsPrincle identities[0], encrypted? In particular if the original token was encrypted.</strong><span style="font-size:13px"><br> </span></span><span style="font-family:arial; font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong>No - the session token (which holds the bootstrap token) gets generated from the IClaimsPrincipal - that's after decryption.<br> But the session token itself is encrypted by default.<br> </span><br> <a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/2e6cfeae-f20d-4a9b-895d-3885b909f79f">View article ...</a> </span></p> <span style="font-size:13px"><br> <span style="line-height:15px; font-size:13px"><span style="font-family:arial; font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q3" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: I have my own library that returns an object of type Microsoft.IdentityModel.Tokens.Saml2.Saml2SecurityToken using WIF API. But I want to get token as XML string or XmlElement. <br> How can I get entire token XML from Saml2SecurityToken object?</strong><span style="font-size:13px"><br> </span></span><span style="font-family:arial; font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong>You can use the SAML security token handler's WriteToken method. This writes to an XmlWriter. Then convert this to a string.<br> e.g.;<br> var sb = new StringBuilder(128);<br> handler.WriteToken(new XmlTextWriter(new StringWriter(sb)), token);<br> </span></span><br> <a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/34b326e5-504f-4b76-9803-a67eab547d19">View article ...</a><br> <br> <span style="line-height:15px; font-family:arial; font-size:13px"><span style="font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q4" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: I created a SAML token signed it using X509 certificate and serialized it to XML<br> What is KeyIdentifier used for? Is it the public key used to decrypt the token?<br> <o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1">W6QZ8TBjeMzd2YdBldib7pOVvT8=<br> How is the key identifier used to fetch right key material and verify the signature and how to do this programmatically?</strong><span style="font-size:13px"><br> </span></span><span style="font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong>There are multiple possible key identifiers - e.g. a thumbprint or the complete certificate is embedded inside the token / signature.<br> On the receiving end - the SecurityTokenResolver classes are used to fetch the right key material (e.g. from the certificate store or re-hydrate the cert from the embedded base64 string inside the token)l.<br> The key identifier for signatures is a hint for the receiver of the token. This hint must be sufficient enough for the receiver to fetch the right key material to verify the signature. </span></span><br> <br> <a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/35684b27-b873-4eb1-ad91-e62f8081099d">View article ...</a><br> <br> <span style="line-height:15px; font-family:arial; font-size:13px"><span style="font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q5" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: Does WIF support federated authentication over webHttpBinding for RESTful WCF endpoints? If so, are there any samples that demonstrate this?</strong><span style="font-size:13px"><br> </span></span><span style="font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong>But you can use WIF to create plumbing for WCF REST services. See library at http://identitymodel.codeplex.com has samples for that.<br> </span></span><br> <a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/e2a043af-f552-4e4c-b8da-aa9282ed615d">View article ...</a><br> <br> <span style="line-height:15px; font-family:arial; font-size:13px"><span style="font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q6" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: How do I create a custom security token on server side and provide it to client from method call? </strong><span style="font-size:13px"><br> </span></span><span style="font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong>When using WSTrustChannelFactory from WIF you can include arbitrary information in the RST. There's also a sample in the SDK.<br> If you want to go the custom WCF service way - you have to populate a SecurityTokenDescriptor class and pass that to the SamlxxSecurityTokenHandler's CreateToken method.<br> But i can tell you that this is not trivial - when you want to use the token for back-end WCF services you also have to deal with proof keys e.g.<br> </span></span><br> <a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/f30632cf-944a-4471-a2b3-7006b9cec199">View article ...</a><br> <br> <span style="line-height:15px; font-family:arial; font-size:13px"><span style="font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q7" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: I am building custom STS but don't want to use X509 Security Token, I want to encrypt the message with my own private/public keys how can this be achieved?<br> What sort of keys? X509 is public/private key.<br> I want to use sn.exe and generate keys using which I want to encrypt the message.</strong><span style="font-size:13px"><br> </span></span><span style="font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong>That's not very common practice - but at the end of the day - a certificate (plus priv key) is just a byte[]. So no need to reinvent the wheel. <br> You can use makecert to create your own X509 keys.<br> </span></span><br> <a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/28961611-4f4a-463b-9072-352878a2a9a7">View article ...</a><br> <br> <span style="line-height:15px; font-family:arial; font-size:13px"><span style="font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q8" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: Did anyone try connecting Win2003 ADFS with PingIdentity using SAML or WSFed?<br> We have a SaaS product that provides SSO with Ping but one of our client wants to use Win2003 ADFS on the IDP side. I would like to test our app connect with an Win 2003 ADFS as IDP.<br> Is there a blog or site with steps to connect ADFS with Ping?</strong><span style="font-size:13px"><br> </span></span><span style="font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong>Does this training piece help? http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b24dbe27-5bea-4564-bf7d-c077af69e997&displaylang=en<br> </span></span><br> <a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/af91d1ba-036d-433f-a15e-6ffead9e5760">View article ... </a><br> <br> <span style="line-height:15px; font-family:arial; font-size:13px"><span style="font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q9" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: My claims based app is working fine on my development machine. I have been using the production ADFS 2 server to retrieve claims and all seems to be working well.<br> Can anyone point me to some guidance on how to move my application to a production server? I normally use MSDeploy to automate my deployments and any assistance on which sections of web.config need to be modified and how would be much appreciated. In particular, how do I set/modify those strings of hex digits? Where do I get the production values from? Do I need to install fedutil on the production machine?<br> There is a video somewhere that I saw some time ago but have lost the reference for it which had a section on how to deploy to production, if anyone knows what I am talking about that would be great! I recall that there was something about adding a name attribute to the microsoft.identityModel/service element but I forget the details.<br> Any pointers or advice would be welcome.</strong><span style="font-size:13px"><br> </span></span><span style="font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong>I think this is the training video you are looking for: http://www.microsoftpdc.com/2009/SVC17</span></span><br> <br> </span><span style="line-height:15px; font-family:arial; font-size:13px"><span style="font-size:13px"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v3q10" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong></strong><strong>: <span style="line-height:15px; font-family:calibri,sans-serif; font-size:13px">What is the difference between Microsoft.IdentityModel and System.IdentityModel?</span></strong><span style="font-size:13px"><br> </span></span><span style="font-size:13px"><span style="font-size:13px"><strong style="font-weight:bold">A</strong><strong>: </strong> <p style="display:inline!important">WIF builds upon System.IdentityModel. You typically use the Microsoft.* classes like Claim and ClaimTypes etc.</p> </span> <p><span style="font-size:13px">I know this is sometimes confusing - but whenever you have a choice between System.* and Microsoft.* - choose Microsoft.*<br> <br> <a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/256c6bcd-6752-4487-b2e8-6c63f4efb9e9">View article ...</a></span></p> </span></span><br> <span style="line-height:16px; font-weight:bold; font-size:13px"><strong><span style="font-size:16px">Volume 2</span><br> </strong></span> <p><span style="font-size:12px; font-family:arial"><strong style="font-family:arial; font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v2q1" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong>Q</strong></a></strong><strong style="font-family:arial">: </strong><span style="font-size:12px"><span style="font-size:13px"><strong>How can I control the type of token my STS issues when it is invoked from an active or passive client?</strong></span><br> </span></span><span style="font-family:arial"><strong style="font-weight:bold">A</strong><strong>: </strong>The key type is part of the RST; either set it manually when using WSTrustChannelFactory, or set it on the binding when you use the automatic token request facility in WCF. The setting is - issuedKeyType=”SymmetricKey” </span></p> <p><span style="font-size:12px; font-family:arial"><span style="line-height:115%; font-size:11pt; font-family:calibri,sans-serif"><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/b18a7860-0ec2-4083-8bed-582b683d9900"><span style="line-height:115%; font-size:10pt">View article...</span></a></span> <br> </span></p> <p><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v2q2" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong><br> Q</strong></a></strong><strong>: </strong><span style="font-size:13px"><span style="line-height:14px"><strong>What event trigger should I use to signal the time for population of session variables?</strong></span><span style="line-height:14px"><br> </span></span><strong style="font-weight:bold">A</strong><strong>: </strong><span style="line-height:115%; font-size:10pt; font-family:calibri,sans-serif">Use (Post)AcquireRequestState. This is the first event were session state is available</span></p> <p><span style="line-height:115%; font-size:10pt; font-family:calibri,sans-serif"><span style="line-height:115%; font-weight:bold; font-size:11pt; font-family:calibri,sans-serif"><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/6996d227-4430-4775-a4bf-2a48ad530e73"><span style="line-height:115%; font-size:10pt">View article...</span></a></span><br> </span></p> <strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v2q3" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong><br> Q</strong></a></strong><strong>: </strong><span style="line-height:14px; font-size:12px; font-family:arial"><strong>H</strong><span style="font-size:12px"><strong>ow do I tell AD FS v2.0 which Claims Provider the application is trying to connect with from within the web application?</strong><br> </span></span><strong style="font-weight:bold">A</strong><strong>: </strong><span style="line-height:14px; font-size:13px">You can set the home realm parameter 'whr' (in config or programmatically) when redirecting to ADFS2. The value must be the issuer URI value of the desired claims provider.</span> <p><span style="line-height:17px; font-weight:bold; font-size:15px; font-family:calibri,sans-serif"><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/86774321-bfb5-46b6-b221-833e6d87ba7c"><span style="line-height:115%; font-size:10pt">View article...</span></a></span></p> <p><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v2q4" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong><br> Q</strong></a></strong><strong>: </strong><span style="line-height:14px; font-size:12px; font-family:arial"><strong>Is there a way for my application to query a third party STS to get a list of all users that are at least 21 years or older?</strong><br> </span><strong style="font-weight:bold">A</strong><strong>: </strong>The short answer is no, not really.<strong> </strong></p> <p style="display:inline!important"><strong><span style="line-height:14px; font-size:13px"></span></strong></p> <p><span style="font-family:arial">Storage of identity information as well as management of that data should belong to the third party. Therefore, the third party needs to provide an external way of providing that information through a report or some other means.</span></p> <p><span style="line-height:115%; font-size:10pt"><strong></strong></span></p> <p><span style="font-family:arial">The idea is that the user store is theoretically a black box, and the only information you can get out of it is the information that the user is willing to give you (via the token) and only <em>when</em> the user is willing to give it to you<strong>.</strong></span></p> <p> </p> <p><span style="line-height:115%; font-size:10pt"><strong></strong></span></p> <p><span style="font-family:arial">Also see the discussion under the section, <span style="text-decoration:underline"> How Can You Get a List of All Possible Users and All Possible Claims.</span></span></p> <p style="line-height:125%; background-color:white"> </p> <p><strong></strong></p> <p><span style="font-family:arial"><span style="line-height:125%; font-size:10pt; color:#333333">See </span><a href="http://msdn.microsoft.com/en-us/library/ff359108.aspx"><span style="line-height:125%; font-size:10pt">http://msdn.microsoft.com/en-us/library/ff359108.aspx</span></a><span style="line-height:125%; font-size:10pt; color:#333333"> for more information.</span></span></p> <p style="line-height:125%; background-color:white"> </p> <p style="line-height:125%; background-color:white"><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/55118597-42af-4482-917c-c2b5820524c4"><span style="line-height:125%; font-size:10pt"><strong></strong></span></a></p> <p><span style="font-family:arial"><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/55118597-42af-4482-917c-c2b5820524c4">View article...</a></span></p> <p><strong style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><a name="v2q5" shape="rect" style="font-weight:normal; color:#0066dd!important; text-decoration:none!important"><strong><br> Q</strong></a></strong><strong>: </strong><span style="line-height:16px; font-size:13px"><strong>How do I configure WIF’s behavior so a user can navigate to a given page, then click ‘login’ to go to an authentication page?</strong><br> </span><strong style="font-weight:bold">A</strong><strong>: </strong><span style="line-height:14px; font-family:arial; font-size:13px">You can use the <authorization /> element in web.config</span></p> <p> </p> <p><span style="line-height:115%; font-size:10pt"></span></p> <p><span style="font-size:12px; font-family:arial">For example:</span></p> <p> </p> <p><span style="line-height:115%; font-size:10pt"></span></p> <p><span style="font-size:12px; font-family:arial"><location path="default.aspx"></span></p> <p><span style="line-height:115%; font-size:10pt"></span></p> <p><span style="font-size:12px; font-family:arial"><span style="font-weight:bold"> </span><system.web></span></p> <p><span style="line-height:115%; font-size:10pt"></span></p> <p><span style="font-size:12px; font-family:arial"><span style="font-weight:bold"> </span><authorization></span></p> <p><span style="line-height:115%; font-size:10pt"></span></p> <p><span style="font-size:12px; font-family:arial"><span style="font-weight:bold"> </span><allow users="*" /></span></p> <p><span style="line-height:115%; font-size:10pt"></span></p> <p><span style="font-size:12px; font-family:arial"><span style="font-weight:bold"> </span></authorization></span></p> <p><span style="line-height:115%; font-size:10pt"></span></p> <p><span style="font-size:12px; font-family:arial"><span style="font-weight:bold"> </span></system.web></span></p> <p><span style="line-height:17px; font-size:15px"><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/5d881b32-9ac8-4f3c-bf64-161dcfe753d6"></a></span></p> <p style="display:inline!important"><a href="http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/5d881b32-9ac8-4f3c-bf64-161dcfe753d6"><span style="font-size:12px; font-family:arial">View article...</span></a></p> <p><strong><a name="Q2.6"><strong>Q</strong></a>: What security consideration should I take when developing and deploying claims aware applications?</strong><br> <strong>A</strong>: Review the following page for security consideration when developing and deploying claims aware applications - <a href="http://msdn.microsoft.com/en-us/library/ee517256.aspx">Security Considerations</a><br> <br> <strong><a name="Q2.7"><strong>Q</strong></a>: Does WIF support OAuth 2.0?</strong><br> <strong>A</strong>: Yes, consider reviewing WIF OAuth Extensions Sample published here - <a href="https://connect.microsoft.com/site1168/Downloads">https://connect.microsoft.com/site1168/Downloads</a><br> <br> <a name="Q2.8"><strong>Q</strong></a>: How to configure token replay detection in configuration file?<br> <strong>A</strong>: Set true for the <strong>enable</strong> attribute of the <span style="font-size:9.5pt; font-family:consolas; color:#a31515"> tokenReplayDetection</span> element in configuration file <br> <br> <strong><strong><strong><a name="Q2.9"><strong>Q</strong></a>:</strong> </strong> What Code Samples are available for WIF?</strong><br> <strong>A</strong>: Review the list of code samples here (scroll down to Code Samples bullet) - <a href="http://blogs.msdn.com/b/alikl/archive/2010/10/21/windows-identity-foundation-wif-sdk-overhaul.aspx">http://blogs.msdn.com/b/alikl/archive/2010/10/21/windows-identity-foundation-wif-sdk-overhaul.aspx</a><br> <br> <strong><a name="Q2.10"><strong>Q</strong></a>: Can I configure SSO with Active Directory for Web Application deployed to Windows Azure? <br> A:</strong> Yes, review the following whitepaper that walks you through the exact steps how to accomplish just that - <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1296e52c-d869-4f73-a112-8a37314a1632">Single Sign-On from Active Directory to a Windows Azure Application Whitepaper</a><br> <br> </p> <span style="line-height:16px; font-size:13px"><strong><span style="font-size:16px">Volume 1</span></strong></span><br> <br> <a name="Q1" shape="rect"><strong>Q</strong></a><strong>: I am getting exception with the following message after deploying my application to a farm. </strong> <p><em><span style="font-size:14pt; font-family:verdana,sans-serif; color:#800000">Key not valid for use in specified state</span></em></p> <p><strong>A</strong>: The default cookie encryption mechanism uses DPAPI. This would mean that a cookie created by one server (or web role instance in case of Azure) would not be readable by another server or web role instance. To solve this problem you should use a cookie encryption mechanism that uses a key shared by all the web role instances or configure your load balancer for sticky session (not available currently for Azure). The following code is taken from patterns &practices guide <span style="font-size:9.5pt; font-family:'segoe ui',sans-serif; color:#000000"><a shape="rect" href="http://msdn.microsoft.com/en-us/library/ff803371.aspx">Moving Applications to the Cloud</a> that shows how to replace the default <strong>SessionSecurityHandler</strong> object and configure it to use the <strong> RsaEncryptionCookieTransform</strong> class in Globala.asax:</span></p> <p> </p> <p><span style="font-size:10pt; font-family:consolas; color:#000000">private void OnServiceConfigurationCreated(object sender, </span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> ServiceConfigurationCreatedEventArgs e)</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000">{</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> List<CookieTransform> sessionTransforms =</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> new List<CookieTransform>(</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> new CookieTransform[] </span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> {</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> new DeflateCookieTransform(), </span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> new RsaEncryptionCookieTransform(</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> e.ServiceConfiguration.ServiceCertificate),</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> new RsaSignatureCookieTransform(</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> e.ServiceConfiguration.ServiceCertificate) </span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> });</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> SessionSecurityTokenHandler sessionHandler = </span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> new</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> SessionSecurityTokenHandler(sessionTransforms.AsReadOnly());</span></p> <p> </p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> e.ServiceConfiguration.SecurityTokenHandlers.AddOrReplace(</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000"> sessionHandler);</span></p> <p><span style="font-size:10pt; font-family:consolas; color:#000000">}</span></p> <p> </p> <p><strong><a name="Q2" shape="rect"></a><span style="color:#00b0f0">Q</span>: I am getting exception:</strong></p> <p><em><span style="font-size:14pt; font-family:verdana,sans-serif; color:#800000">Configuration Error</span></em> </p> <p><strong><span style="font-size:8.5pt; font-family:verdana,sans-serif; color:#000000">Description: </span></strong><span style="font-size:8.5pt; font-family:arial,sans-serif; color:#000000">An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. </span> </p> <p style="margin-bottom:12pt"><strong><span style="font-size:8.5pt; font-family:verdana,sans-serif; color:#000000">Parser Error Message: </span></strong><span style="font-size:8.5pt; font-family:arial,sans-serif; color:#000000">Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.<br> <br> </span><strong><span style="font-size:8.5pt; font-family:verdana,sans-serif; color:#000000">Source Error:</span></strong> </p> <table width="100%" cellspacing="3" cellpadding="0" border="0" style="background-color:#ffffcc; width:100%"> <tbody> <tr> <td style="padding:0.75pt"> <p><span style="font-size:9pt; font-family:'lucida console'; color:#000000"> </span></p> <p><span style="font-size:9pt; font-family:'lucida console'; color:#000000">Line 27: during development.</span></p> <p><span style="font-size:9pt; font-family:'lucida console'; color:#000000">Line 28: --></span></p> <p><span style="font-size:9pt; font-family:'lucida console'; color:#ff0000">Line 29: <compilation debug="true" targetFramework="4.0"></span></p> <p><span style="font-size:9pt; font-family:'lucida console'; color:#000000">Line 30: <assemblies></span></p> <p><span style="font-size:9pt; font-family:'lucida console'; color:#000000">Line 31: <add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></span></p> </td> </tr> </tbody> </table> <p><strong>A</strong>: .NET 4.0 required. Install or configure your server to use ASP.NET 4.0.To configure your server for using ASP.NET run the following command in command prompt. Make sure the Framework version is 4.0:<br> <br> <br> C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe –i</p> <p>Make sure the AppPool runs under .Net 4.0, located in AppPools Advanced Settings under General section:</p> <p><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/CommunityServer-Wikis-Components-Files/00-00-00-00-05/4456.IIS-AppPool-Runs-.Net-4.0.jpg" style="border:0px solid"></p> <p>Note: Changing AppPool configuration may break other applications running in this AppPool. Consider creating separate AppPool for the application with the new configurations applied.</p> <p><strong><a name="Q3" shape="rect"><strong>Q</strong></a>: I am getting exception:</strong></p> <p><em><span style="font-size:14pt; font-family:verdana,sans-serif; color:#800000">A potentially dangerous Request.Form value was detected from the client (wresult="<t:RequestSecurityTo...").</span></em></p> <p><strong>A</strong>: <a shape="rect" href="http://social.technet.microsoft.com/wiki/contents/articles/windows-identity-foundation-wif-a-potentially-dangerous-request-form-value-was-detected-from-the-client-wresult-quot-lt-t-requestsecurityto-quot.aspx"> http://social.technet.microsoft.com/wiki/contents/articles/windows-identity-foundation-wif-a-potentially-dangerous-request-form-value-was-detected-from-the-client-wresult-quot-lt-t-requestsecurityto-quot.aspx</a> </p> <p><strong><a name="Q4" shape="rect"><br> <br> <strong>Q</strong></a></strong>: <strong>What are the options for implementing authorization in claims aware application?</strong></p> <p><strong>A</strong>: You can implement Claims Based Access Control (CBAC) which gives you freedom of implementing authorization decision based on claims in the token extending ClaimsAuthorizationManager. Here is example how - <span style="font-size:9pt; font-family:'segoe ui',sans-serif; color:#333333"><a shape="rect" href="http://blogs.msdn.com/b/alikl/archive/2010/09/18/windows-identity-foundation-wif-by-example-part-iii-how-to-implement-claims-based-authorization-for-asp-net-application.aspx">How To Implement Claims Based Authorization For ASP.NET Application</a>.</span> For traditional Role Based Access Control (RBAC) which is suitable for migration scenarios consider reviewing these simple walkthroughs: </p> <ul style="list-style-type:disc"> <li style="line-height:13.5pt; background-color:white; color:#333333"><span style="font-size:9pt; font-family:'segoe ui',sans-serif"><a shape="rect" href="http://blogs.msdn.com/b/alikl/archive/2010/11/05/isinrole-authorization-in-asp-net-application-configured-for-federated-authentication-using-windows-identity-foundation-wif-and-claimsauthenticationmanager.aspx">IsInRole Authorization in ASP.NET Application Using Windows Identity Foundation (WIF) and ClaimsAuthenticationManager</a></span> </li><li style="line-height:13.5pt; background-color:white; color:#333333"><span style="font-size:9pt; font-family:'segoe ui',sans-serif"><a shape="rect" href="http://blogs.msdn.com/b/alikl/archive/2010/11/04/isinrole-authorization-in-asp-net-application-configured-for-federated-authentication-using-windows-identity-foundation-wif-and-azure-appfabric-access-control-service.aspx">IsInRole Authorization in ASP.NET Application Using Windows Identity Foundation (WIF) and Azure AppFabric Access Control Service </a></span> </li><li style="line-height:13.5pt; background-color:white; color:#333333"><span style="line-height:18px"><a shape="rect" href="http://blogs.msdn.com/b/alikl/archive/2010/11/18/authorization-with-rolemanager-for-claims-aware-wif-asp-net-web-applications.aspx" style="outline-style:none; color:#ff6600; font-weight:normal; text-decoration:none">Authorization With RoleManager For Claims Aware (WIF) ASP.NET Web Applications</a></span> </li></ul> <p> </p> <p><strong><a name="Q5" shape="rect"><strong>Q</strong></a>: I am receiving exception with the following message:</strong></p> <p><em><span style="font-size:14pt; font-family:verdana,sans-serif; color:#800000">The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.</span></em></p> <p><strong>A:</strong> Configure IIS to load user profile. To configure IIS to load user profile follow these steps:</p> <ul> <li>Open IIS Manager. </li><li>Find out what AppPool your application is using by selecting your App, right-click on it, and Select Manage Application -> Advanced Settings. </li><li>After that, on the top left hand side, select Applications Pools, and go ahead and select the App Pool used by your app. </li><li>Right-click on the App Pool, and select Advanced Settings, Go to the Process Model Section and Find the "Load User Profile" Option and set it to true. </li></ul> <p><span style="line-height:14px; font-family:calibri; font-size:13px"><span style="font-weight:bold; color:#4f81bd"><br> <br> Q</span><strong>: I am getting the following error: I updated with new <em>stsServer</em> certificate and changed the Web.config to point to new </strong></span><span style="line-height:14px; font-family:calibri; font-size:13px"><strong>trusted certificate.</strong></span></p> <p style="margin:0in 0in 10pt 0.5in"><em><span style="line-height:115%; font-family:verdana,sans-serif; color:#800000">ID4175: The issuer of the security token was not recognized by the IssuerNameRegistry. <br> To accept security tokens from this issuer, configure the IssuerNameRegistry to return a valid name for this issuer.</span></em> </p> <strong></strong><strong></strong> <p style="margin:0in 0in 10pt"><span style="line-height:115%; font-size:10pt; font-family:calibri"><strong>A</strong>: If you copied the thumbprint from MMC snap-in into config, there is a known problem with copying from the certificate properties window into the config file and getting an extra non-printable character in the text string, which causes the thumbprint match to fail.</span></p> <strong></strong> <p>Procedure for finding thumbprint taken from this page - <a shape="rect" href="http://msdn.microsoft.com/en-us/library/ff359102.aspx"> http://msdn.microsoft.com/en-us/library/ff359102.aspx</a> <br> <br> <strong>To find a thumbprint</strong><br> <br> 1. On the taskbar, click Start, and then type mmc in the search box. <br> <br> 2. Click mmc. A window appears that contains the Microsoft Management Console application. <br> <br> 3. On the File menu, click Add/Remove Snap-in. <br> <br> 4. In the Add or Remove Snap-ins dialog box, click Certificates, and then click Add. <br> <br> 5. In the Certificates snap-in dialog box, select Computer account, and then click Next. <br> <br> 6. In the Select Computer dialog box, select Local computer, click Finish, and then click OK. <br> <br> 7. In the left pane, a tree view of all the certificates on your computer appears. If necessary, expand the tree. Expand the Personal folder. Expand the Certificates folder. <br> <br> 8. Click the certificate whose thumbprint you want. <br> <br> 9. In the Certificate Information dialog box, click the Details tab, and then scroll down until you see the thumbprint.<br> <br> 10. Copy then paste into VS editor (web.config)<br> <br> 11. Position the cursor in the beginning of the thumbprint by pressing on Home button.<br> <br> 12. Press Delete button to remove leading non-printable character.</p> <p>Note – Try to avoid the situation in the first place by not selecting the blank before the 9f at the start.<br> <br> If issues arise, you should be able to see it just by typing the web.config in a command window </p> <p><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/CommunityServer-Wikis-Components-Files/00-00-00-00-05/5734.thumbprint.png" style="border:0px solid"></p> <p><strong><br> <br> </strong><span></span></p> <p style="font-family:calibri"><strong><a name="Q7"></a><span style="color:#0070c0">Q</span>: I am on a customer site and we have the following issue installing the WIF 4.0 SDK.</strong></p> <p style="font-family:calibri"> </p> <ul> <li>Customer Machine is Windows 7 Ultimate </li><li>Windows Identify Runtime has been installed </li></ul> <p style="font-family:calibri"> When installing the WIF 4.0 SDK we get the following Error: 2738</p> <p style="font-family:calibri"> <span style="color:#000000">Searching (search engine of choice) for the following “msiexec.exe error 2738” to</span><span style="color:#1f497d"> </span><a href="http://msdn.microsoft.com/en-us/library/aa372835%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx</a></p> <p><span style="font-family:calibri"> </span><span class="Apple-tab-span" style="white-space:pre; font-family:calibri"> </span><span style="border-collapse:collapse; font-size:medium; font-family:calibri">2738 - </span>Could not access VBScript run time for custom action [2].</p> <div><span style="font-family:calibri; color:#000000"><strong>A</strong></span><span style="font-family:calibri; color:#000000">: If Visual Studio 2010 is not installed, install it. - <a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions">http://www.microsoft.com/visualstudio/en-us/products/2010-editions</a></span></div> <p><span><br> <span style="font-family:'segoe ui'; color:#1f497d"><strong>Q</strong></span></span><span style="font-weight:bold; font-family:calibri; color:#000000">: I am getting the following exception - </span></p> <p><span style="line-height:18px; font-family:'times new roman',serif; font-size:16px; color:#000000"><strong>An error occurred during processing of the request.</strong></span></p> <p style="margin-bottom:5pt"><span style="line-height:115%; font-size:12pt; font-family:'times new roman',serif; color:#000000"><strong>Unknown server tag 'adfs:InformationCardControl'. </strong></span></p> <p style="margin-bottom:5pt"><span style="line-height:115%; font-size:12pt; font-family:'times new roman',serif; color:#000000"><strong>Additional data: 6941c49e-1098-471b-b13a-b6718c6b8bfc </strong></span></p> <p><span style="font-family:'segoe ui'; color:#000000"><strong>A</strong>: Remove RC version of ADFS v2 and install RTW from - <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=118c3588-9070-426a-b655-6cec0a92c10b&displaylang=en">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=118c3588-9070-426a-b655-6cec0a92c10b&displaylang=en</a> <br> <br> <br> <span style="font-family:'segoe ui','lucida grande',verdana,arial,helvetica,sans-serif; color:#333333"><strong><span style="color:#1f497d"><br> Q</span>: How do I get an email address claim from ACS v2?</strong></span></span></p> <p><span><strong>A</strong>: You cannot obtain user's Windows Live email address from ACS. This is actually a security policy imposed by Live ID </span><span><a href="http://social.msdn.microsoft.com/Forums/en-US/windowsazuresecurity/thread/b2d2e62d-1a93-43bd-9717-a82fd63ed3cd">http://social.msdn.microsoft.com/Forums/en-US/windowsazuresecurity/thread/b2d2e62d-1a93-43bd-9717-a82fd63ed3cd</a><br> <br> </span></p> <div class="section" id="sectionSection7"><[default] http://ddue.schemas.microsoft.com/authoring/2003/5:content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"> <p><strong><strong><span style="color:#1f497d"><a name="Q10"></a><a name="Q11"></a><br> Q</span></strong></strong>: <strong>My application uses WIF and requires that it be installed as a prerequisite. Can I distribute the runtime files with my application?</strong></p> <p><strong>A</strong>: Absolutely. There is now an additional <a target="_blank" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c148b2df-c7af-46bb-9162-2c9422208504"><span style="color:#000000">EULA for the WIF SDK</span> </a>that allows developers to redistribute the WIF runtime with their application when they develop an application using WIF. <br> <br> See the <strong>WIF SDK supplemental EULA</strong> in the list of <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c148b2df-c7af-46bb-9162-2c9422208504"> possible downloads</a> (<span style="font-size:15px"><a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c148b2df-c7af-46bb-9162-2c9422208504"><span style="font-size:12px; color:#000000">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c148b2df-c7af-46bb-9162-2c9422208504</span></a><span style="font-family:calibri,sans-serif; color:#1f497d">).</span></span></p> </div> <br> </body> </html>
Comment
Tags
Please add 3 and 2 and type the answer here: