Integrated Domain Authentication on Using Service Reference

Problem

The article describes the case when it is required to set up integrated domain authentication for the web application, which connects platform services by using Service Reference.

Solution

Solving the problem:

  1. Repeat all steps to set up integrated domain authentication, except for setting up the PP.xml file in the first part of the Item 5.

  2. Set up class instance for working with services:

SomPortTypeClient client = new SomPortTypeClient();
client.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Delegation;

  1. Enter the settings in the <security> tag of the web.config file:

<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows"/>
</security>

Example of a completely configured web.config file

NOTE. On working with Oracle server take into account Oracle additional settings on working with domain authentication.

See also:

Web Applications Developers Knowledge Base