Configuring IIS to use the sample applications
To see a working demonstration of the .NET Integration Kit, deploy the sample applications and configure your Internet Information Services (IIS) server.
Before you begin
-
Windows Server 2016 or later with IIS 10.0+
-
.NET 8 Hosting Bundle installed on the IIS server (choose Hosting Bundle, not the runtime or SDK alone)
-
An existing IIS website with an HTTPS binding to deploy the applications under
|
Install the .NET 8 Hosting Bundle after IIS. If IIS was installed after the Hosting Bundle, run the Hosting Bundle installer again to register the ASP.NET Core Module. |
Setting up samples as applications within a site
-
Install the .NET 8 Hosting Bundle.
-
From the .NET Integration Kit
.ziparchive, copy thesample/IdpSampleandsample/SpSampledirectories to your IIS server, such asC:\inetpub\wwwroot. -
Create application pools.
Each application requires its own application pool set to
No Managed Code.-
Open IIS Manager.
-
Click Application Pools > Add Application Pool.
-
For the IdP application:
Name
IdpSamplePool.NET CLR Version
No Managed CodeManaged pipeline mode
Integrated -
For the SP application:
Name
SpSamplePool.NET CLR Version
No Managed CodeManaged pipeline mode
Integrated
-
-
Add the applications under the existing website.
In IIS Manager, expand Sites and select the website under which you want to host the applications.
-
Right-click the website and choose Add Application.
-
For the IdP application:
Alias
IdpSampleApplication pool
IdpSamplePoolPhysical path
C:\inetpub\wwwroot\IdpSample\publish -
For the SP application:
Alias
SpSampleApplication pool
SpSamplePoolPhysical path
C:\inetpub\wwwroot\SpSample\publishThe applications will be accessible at:
IdP: https://<your-site>/IdpSample
SP: https://<your-site>/SpSample
-
-
Configure permissions.
The application pool identity must have read access to the publish directory and write access to the logs and config directories.
-
Right-click C:\inetpub\wwwroot\IdpSample\publish > Security > Edit > Add
-
Enter
IIS AppPool\IdpSamplePool. -
Click Check Names > OK > Read & Execute > OK
-
Repeat steps a - c on
C:\inetpub\wwwroot\IdpSample\publish\wwwroot\config. Select Modify instead of Read & Execute.If application-level logging is enabled through
web.configandappsettings.json, ensure the logs directory has Modify permission granted to the application pool identity. -
Repeat steps a - c on
C:\inetpub\wwwroot\SpSample\publishusing IISAppPool\SpSamplePool. -
Repeat step d on
C:\inetpub\wwwroot\SpSample\publish\wwwroot\configusing IISAppPool\SpSamplePool.
-
-
Verify the deployment.
-
Go to https://<your-site>/IdpSample.
The IdP application landing page should load.
-
Go to https://<your-site>/SpSample.
The SP application landing page should load.
-
-
If needed, go to https://<yoursite>/IdpSample/Config to review or update the following fields:
Field Default Description PingFederate Base URL
https://localhost:9031/Update if PingFederate is running on a different host or port.
SP Connections
localhost:default:entityIdUpdate if your SP connection entity ID differs.
IdP Adapter Instances
OTIdPJavaUpdate if you used a different adapter instance ID.
Attribute Names List
authnContext|email|roleUpdate to match the attributes configured in your IdP adapter’s extended contract.
Agent Configuration File
N/A
Upload a replacement
agent-config.txtif you downloaded a new one from PingFederate after changing the adapter password or cipher suite.-
Click Save.
-
-
If needed, go to https://<yoursite>/SpSample/Config to review or update the following fields:
Field Default PingFederate Base URL
https://localhost:9031/IdP Connections
localhost:default:entityIdSP Adapter Instances
OTSPJavaAttribute Names List
authnContext|email|roleAgent Configuration File
Upload a replacement
agent-config.txtif you downloaded a new one from PingFederate after changing the adapter password or cipher suite. -
Ensure the PingFederate configuration is updated to match the domain of Sample App deployed within IIS.
-
For example, the Authentication Service field for the OpenToken IdP Adapter should be set to
https://localhost/IdpSample/Login.
-