flowing identity from UI-tier to DB-tier

  • Thread starter Thread starter Ole Hanson
  • Start date Start date
O

Ole Hanson

Hi,

I would like to flow the identity obtained in the UI (ASP.NET, Kerberos) to
my datatier which is a remote Sharepoint installation. The Sharepoint
installation is only used as documentstore, and I access it using the
built-in webservices.

Therefore, I need an object implementing the ICredentials interface, as this
is what the webservices requires.

Question: How do I go from the IPrincipal (System.Web.Page.User) ->
ICredentials object?

Thanks!
 
Can you provide some code and better description of what you're doing?

It could be that your problem is as simple as adding the following line of
code to your code behind after instantiating the proxy for your webservice
but before calling any methods on your webservice:

myWebServiceProxyObject.Credentials =
System.Net.CredentialCache.DefaultCredentials;

Of course, you need to make sure you add <identity impersonate="true" /> to
your web.config file in the system.web section, and make sure that you turn
off anonymous access to your website.

HTH

DalePres
MCAD, MCDBA, MCSE
 
Back
Top