wif

What's the .NET 4.5 equivalent to UserNameWSTrustBinding?

坚强是说给别人听的谎言 提交于 2019-12-06 17:25:22
问题 I am converting a active profile STS to the new .NET 4.5 System.IdentityModel framework. My code using the UserNameWSTrustBinding which doesn't seem to exist in the new framework. Any suggestions. 回答1: Although this is an old question, I couldn't find any non-third-party answer on the internet, so here it is: To replace UserNameWSTrustBinding in .NET 4.5, use the following: var binding = new WS2007HttpBinding(SecurityMode.{what it was before}); binding.Security.Message.ClientCredentialType =

RESTful authentication using ACS

…衆ロ難τιáo~ 提交于 2019-12-06 16:06:59
I have a web application written in ASP .NET MVC 3. I'm using ACS for authenticating my users and I defined Google, Windows Live, Yahoo! and Facebook as identity providers. Now I want to expose a REST API for the application (I want to create an app for WP7). Some of the calls require that the user is authenticated so I thought I should pass a token in the authentication header of the request. What is the best approach to do this with ACS? Is the ACS able to provide me these kind of tokens or am I responsible for writing the code that generates these tokens? Yes. ACS supports this scenario

Passing SAML Token to WCF service from Asp.Net

ぃ、小莉子 提交于 2019-12-06 15:02:31
When i try to invoke a WCF service from an asp.net application (RP) which is authenticated by another asp.net application(IP) , I'm getting an error message with content of Login page (It is trying to reach the login page because it could not authenticate the request). Identity Provider : _http://localhost/AuthenticatonWS/Login.aspx Relying party Website : _http://localhost/RPWebsite/Default.aspx WCF Service : _http://localhost/RPWebsite/Service1.svc (In my solution I'm calling service1.svc from default.aspx.cs) I don't want the service to be anonymous. Currently the site (RPWebsite) uses STS

Is it possible to tell IIS to treat all old cookies as expired? (CryptographicException)

元气小坏坏 提交于 2019-12-06 14:56:17
问题 We are using WIF authentication, and we have an issue that pops up on occassion where a users cookie gets in a bad state. The exception that gets thrown is: System.InvalidOperationException: ID1073: A CryptographicException occurred when attempting to decrypt the cookie using the ProtectedData API (see inner exception for details). If you are using IIS 7.5, this could be due to the loadUserProfile setting on the Application Pool being set to false. ---> System.Security.Cryptography

Windows Identity Foundation: How to get new security token in ASP.net

那年仲夏 提交于 2019-12-06 12:39:59
问题 I'm writing an ASP.net application that uses Windows Identity Foundation. My ASP.net application uses claims-based authentication with passive redirection to a security token service. This means that when a user accesses the application, they are automatically redirected to the Security Token Service where they receive a security token which identifies them to the application. In ASP.net, security tokens are stored as cookies. I want to have something the user can click on in my application

Custom Authentication on Asp.Net 4.5 with WIF

本小妞迷上赌 提交于 2019-12-06 12:10:57
问题 I have an application set up with Azure ACS and .net 4.5 using claims. My application uses dropbox also. I was wondering if i could let users identify them self with dropbox alone. I get a token from dropbox when the user logs in with dropbox and a unique id. Where in the .net pipe do i tell it that i have authenticated a user, such the principals are set on the next request also. To make the example simple, lets say i have a form with two inputs. name,pass. If the name is 1234 and pass is

How to share authentication context between a SharePoint 2010 Site and ASP.NET applications

元气小坏坏 提交于 2019-12-06 10:08:49
Is it possible to share the claims based authentication of a logged in Sharepoint 2010 user with a separate Asp.net application? The following article describes how it was done using Sharepoint 2007 and forms authentication through forms auth and sharing machine keys etc however I cannot find any information regarding the external application consuming the claims authentication that is now used in Sharepoint 2010? Who authenticates the user in SP in your app? In a claims based architecture, you normally would deploy an STS that will authenticate users and issue security tokens (e.g. ADFS).

How can I create a test signing certificate?

六月ゝ 毕业季﹏ 提交于 2019-12-06 06:20:18
问题 I'm trying to follow these instructions to create a SAML2 token using WIF. The instructions say To supply signing credentials to the SecurityTokenDescriptor, you must first get a reference to the signing certificate as an X509Certificate2 instance. From this you can create a SecurityKeyIdentifier and produce a SigningCredentials instance The following code is supplied: X509Certificate2 signingCert = CertificateUtil.GetCertificate(StoreName.My, StoreLocation.LocalMachine, "CN=busta-rpsts.com "

ASP.NET multiple federated identity providers

前提是你 提交于 2019-12-06 06:03:47
I am developing an ASP.NET application. I have successfully added an STS reference to a stand-alone AD FS 2.0 server, so I can authenticate against a 3rd party's active directory. The problem is that I have more than one client who wishes to be able to authenticate against their own active directory. It seems that I can only add one STS reference to a project. How do I add multiple identity providers to an ASP.NET application and then programatically choose which provider I want to redirect the browser to for authentication? Thanks! Ralphie That's not the normal federation pattern. You

ASP.NET requestValidation 4.5 and WIF

帅比萌擦擦* 提交于 2019-12-06 04:21:38
问题 I have an ASP.NET MVC application with Windows Identity Foundation authentication enabled with ADFS as STS. The application is now on .NET 4.5 with MVC 4. When I change the ASP.NET requestValidation from 2.0 to 4.5, I get this error: A potentially dangerous Request.Form value was detected from the client (wresult="<t:RequestSecurityTo..."). I guess this is the redirect from ADFS. How can I fix this? 回答1: Upgrade your application to use WIF 4.5 included in the framework: http://msdn.microsoft