Routing Userrights to another ASP.Net Webapplication

T

T. Beneke

I've got a ASP.Net Application, whos running on an IIS with integrated
security. This Application offers a download for documents who are not
hosted in the ASP.Net Application. It's hosted on a several SharePoint
Server and all servers are in the same domain. A User has access to both of
the Server.
I want to handle a request from the ASP.Net Application to the SharePoint
with the userrights (usercredential) of the current user.

Here is a samplesourcecode to explain:

Dim WC As New System.Net.WebClient
....
'WC.Credentials = CredentialCache.DefaultCredentials ' doesn't work
'WC.Credentials = CredentialCache.DefaultNetworkCredentials 'doesn't work
WC.Creddentials = New Net.NetworkCredential("mr.x", "password", "domain...")
' works fine!!! but in the current context I've got no password
Return WC.DownloadData("http://sampleserver/subdir/sample.pdf")
....

i need something like:
WC.Credentials = HttpContext.Current.User.Credentials 'this is only an
example it dosn't exist

Has anybody an idea?

Thanks
Thomas
 
J

Joe Kaplan

In order to make this type of scenario work, you need to implement Kerberos
delegation. If you are able to do that, then DefaultCredentials will work
ok.

Kerberos delegation can be a challenge to set up, but there are many
documents from Microsoft that explain how.

You probably won't change anything from a coding perspective. It is mostly
an act of configuration.

Joe K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top