I have an web application that uses windows integrated security. I also have a windows service that runs as local system. The web application uses .NET remoting to execute a method on the serivce through tcpip channel. Is there a way, on .NET 2.0, to pass the windows identity to the service?
Per MSDN documentation, configure the client and server app.config files.
Server:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" secure="true" impersonate="true" />
</channels>
</application>
</system.runtime.remoting>
</configuration>
Client:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" secure="true" tokenImpersonationLevel="impersonation"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>
Notice that the attribute is called impersonate for the server but tokenImpersonationLevel for the client.
See: http://msdn.microsoft.com/en-us/library/59hafwyt(VS.85).aspx