I am developing a winforms application that will user the wcf proxy to communicate with the remote data portal
which is hosted inside of IIS 5.1 (sql server database also on the same box as the remote portal).
I would like to use windows authentication as it is an internal application..
I have set up the virtual directory to disallow anonymous access and to use integrated security.
I have set the web.config to use windows authentication and to impersonate the user.
It seems that by querying the csla.ApplicationContext.User.Identity within my dataportal fetch that
the dataportal knows the identification of the windows user, but when the database conectionManager tries to create a connection
an error is thrown along the lines of Login failed for user 'MachinName\ASPNET' (as though the identity has not flowed through to sql server)
Any ideas are very welcome as its driving me nuts!
My Configurations are as follows:
This is my client config
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="myBasicHttpBindingConfig" closeTimeout="00:01:00"
openTimeout="01:00:00" receiveTimeout="01:00:00" sendTimeout="01:00:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<client>
<endpoint address="http://localhost/WcfHost/WcfPortal.svc"
binding="basicHttpBinding"
bindingConfiguration="myBasicHttpBindingConfig"
contract="Csla.Server.Hosts.IWcfPortal"
name="WcfDataPortal" />
</client>
</system.serviceModel>
--My server side web.config
In system.web the bellow 2
<authentication mode="Windows" />
<identity impersonate="true"/>
in system.servive model
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="myHttpBindingConfig">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</wsHttpBindin</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="myWCFBehaviors">
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceMetadata httpGetEnabled="true"/>
<!--<serviceAuthorization impersonateCallerForAllOperations="true" />-->
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Csla.Server.Hosts.WcfPortal" behaviorConfiguration="myWCFBehaviors">
<endpoint contract="Csla.Server.Hosts.IWcfPortal"
binding="basicHttpBinding"
bindingConfiguration="myHttpBindingConfig">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex"
binding="basicHttpBinding"
bindingConfiguration="myHttpBindingConfig"
contract="IMetadataExchange">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</serv</services>
</system.serviceModel>
Thanks for looking.
Did you to paste a a link in?
Thanks Martin
I checked that article you mentioned out, and I think that we are not using Kerberos (I have a feeling we use NTLM).
The mentioned article stated that..
"NTLM does not support delegation.
Kerberos supports delegation with the appropriate Active Directory configuration."
So perhaps that is the issue, and not the delegation between the 3 different processes after all.
I'll keep digging anyway!
Thanks for the link
I will check it out.
Apols for my garbled last post, i was posting from my phone and my daughter was climbing all over me at the time!
Just to clarify in short...
I have a winforms client -remote dataportal hosted in IIS 5.1 (communication through wcf proxy) -and a sql server database setup. (i am using csla version 3.6.3)
I have set the identity impersonate="true" in web config, and enabled Windows Integrated security , disabled anonymous access inside of IIS.
When I debug inside of the dataportal methods i have the expected windows logon passed through ok,
however when the dataportal then calls a stored procedure in the database (which is relying on integrated security), sql server does not receive the windows logon , but instead the ASP.NET user.
I suspect that is something to do with the impersonation not being able to cross the 2 processes.
hope that made more sense than my last post!
Thanks a lot
Dexter
Copyright (c) Marimer LLC