To work around this problem, use one of the following methods.
Method 1
Configure the application pool identity to run as a user account for which the user profile is already loaded. For example, configure the application pool identity to run as the Network Service account.
Method 2
Manually load the user profile of the application pool identity. To do this, use one of the following methods.
Method A
Follow these steps:
- Use a user account to log on to the computer, and then do not change the user account.
- Under this user account, create a Microsoft Windows service, or run a Windows service.
- Configure the Windows service so that the user account can interact with the desktop.
Method B
To load the user profile, call the
LoadUserProfile function.
Method 3
Disable the stateful
SecurityContextToken object of the Web service by configuring the
statefulSecurityContextToken element. For example, you can use the application configuration file that contains the following code to disable the stateful security tokens.
<tokenIssuer>
<statefulSecurityContextToken enabled="false"/>
</tokenIssuer>
Method 4
To configure the Web service to use a secure conversation, use an X509 certificate, or use another security token type instead of using the default DPAPI implementation. To do this, configure the
serviceToken element in the application configuration file of each Web server. For example, the following code configures the Web service to use an X509 certificate instead of using the default DPAPI implementation.
<microsoft.web.services3>
<tokenIssuer>
<statefulSecurityContextToken enabled="true"/>
<serviceToken>
<add>
<KeyInfo>
<wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">bBwPfItvKp3b6TNDq+14qs58VJQ=</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</KeyInfo>
</add>
</serviceToken>
</tokenIssuer>
</microsoft.web.services3>