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
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