So inorder to get the Windows identity first and for most we need to add the following config
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
This is to enable the asp.net Compatibility then only we can acess the HTTP Context that contains the User Identity
The follwing binding which will give the Current user identity
<bindings> <basicHttpBinding> <binding name ="BasicHttpBindingConfig"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" /> </security> </binding> </basicHttpBinding> </bindings>
we need to add this Binding inside the service where we need to access the windows identity like
<service behaviorConfiguration="SecurityConfigurationServiceBehavior" name="SecurityConfigurationService"> <endpoint address="" binding="basicHttpBinding" contract="ISecurityConfigurationService" behaviorConfiguration="SilverlightFaultBehavior" bindingConfiguration ="BasicHttpBindingConfig" > <identity> <dns value="localhost" /> </identity> </endpoint> </service>
After this configuration we have to ensue that no more end points are configured.
We need to enable some settings inside the IIS to get the Windows Identity i.e enable is Windows integrated options
0 comments:
Post a Comment