.NET Integration Kit

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

  1. Install the .NET 8 Hosting Bundle.

  2. From the .NET Integration Kit .zip archive, copy the sample/IdpSample and sample/SpSample directories to your IIS server, such as C:\inetpub\wwwroot.

  3. Create application pools.

    Each application requires its own application pool set to No Managed Code.

    1. Open IIS Manager.

    2. Click Application Pools > Add Application Pool.

    3. For the IdP application:

      Name

      IdpSamplePool

      .NET CLR Version

      No Managed Code

      Managed pipeline mode

      Integrated

    4. For the SP application:

      Name

      SpSamplePool

      .NET CLR Version

      No Managed Code

      Managed pipeline mode

      Integrated

  4. Add the applications under the existing website.

    In IIS Manager, expand Sites and select the website under which you want to host the applications.

    1. Right-click the website and choose Add Application.

    2. For the IdP application:

      Alias

      IdpSample

      Application pool

      IdpSamplePool

      Physical path

      C:\inetpub\wwwroot\IdpSample\publish

    3. For the SP application:

      Alias

      SpSample

      Application pool

      SpSamplePool

      Physical path

      C:\inetpub\wwwroot\SpSample\publish

      The applications will be accessible at:

      IdP: https://<your-site>/IdpSample

      SP: https://<your-site>/SpSample

  5. Configure permissions.

    The application pool identity must have read access to the publish directory and write access to the logs and config directories.

    1. Right-click C:\inetpub\wwwroot\IdpSample\publish > Security > Edit > Add

    2. Enter IIS AppPool\IdpSamplePool.

    3. Click Check Names > OK > Read & Execute > OK

    4. 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.config and appsettings.json, ensure the logs directory has Modify permission granted to the application pool identity.

    5. Repeat steps a - c on C:\inetpub\wwwroot\SpSample\publish using IIS AppPool\SpSamplePool.

    6. Repeat step d on C:\inetpub\wwwroot\SpSample\publish\wwwroot\config using IIS AppPool\SpSamplePool.

  6. Verify the deployment.

    1. Go to https://<your-site>/IdpSample.

      The IdP application landing page should load.

    2. Go to https://<your-site>/SpSample.

      The SP application landing page should load.

  7. 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:entityId

    Update if your SP connection entity ID differs.

    IdP Adapter Instances

    OTIdPJava

    Update if you used a different adapter instance ID.

    Attribute Names List

    authnContext|email|role

    Update to match the attributes configured in your IdP adapter’s extended contract.

    Agent Configuration File

    N/A

    Upload a replacement agent-config.txt if you downloaded a new one from PingFederate after changing the adapter password or cipher suite.

    1. Click Save.

  8. 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:entityId

    SP Adapter Instances

    OTSPJava

    Attribute Names List

    authnContext|email|role

    Agent Configuration File

    Upload a replacement agent-config.txt if you downloaded a new one from PingFederate after changing the adapter password or cipher suite.

  9. Ensure the PingFederate configuration is updated to match the domain of Sample App deployed within IIS.

    1. For example, the Authentication Service field for the OpenToken IdP Adapter should be set to https://localhost/IdpSample/Login.