Connect an ASP.NET and ASP.NET MVC web site using WS-Federation
With a few steps you can connect your ASP.NET or ASP.NET MVC web site to The Identity Hub using WSFederation. .NET supports authentication using WS-Federation out of the box.
A. Create an App
- Create an App for your application. See Create an App for details.
- For WS-Federation Reply URL's set the URI of your website including the port number if it is different than the default 443.
- Type the realm for the application in Relying Party Realm.
- Supply a Token Signing Certificate and optionally a Relying Party Certificate.
B. Install the SDK (Optional)
- In Visual Studio open the ASP.NET or ASP.NET MVC solution.
- Right-click the web project and click Manage NuGet packages.
- On the Browse tab search for TheIdentityHub.AspNet
- Select TheIdentityHub.AspNet from the list and click Install.
C. Download and apply the web.config
- Navigate to the Apps list (https://www.theidentityhub.com/{tenant}/Admin/App) and select the application you are connecting.
- Open the WS-Federation Web Applications and Relying Parties section (you might need to scroll down to find the section).
- Under Example configuration for .NET click web.config. You can choose between a version using legacy Microsoft.IdentityModel of using System.IdentityModel.
- Copy the content of the example web.config in the web.config file of the web application project. If you already have configuration in the web.config copy the sections in the appropriate locations.
- Run your web application.
See the ASP.NET SDK for more configuration options and on how to get information on the authenticated user.
D. View WS-Federation parameters to connect via custom provider or non/other .NET technology
- Navigate to the Apps list (https://www.theidentityhub.com/{tenant}/Admin/App) and select the application you are connecting.
- Open the WS-Federation Web Applications and Relying Parties section (you might need to scroll down to find the section) to see the WS-Federation parameters.