Ask a Question related to ASP.NET Security, Design and Development.
-
Colin Bowern #1
DefaultCredentials and WebClient
I'm trying to make a call inside an ASP.NET web application to an external
quasi-web service (aka FrontPage Server Extensions):
Dim rpcClient As New WebClient
Dim rpcData As New NameValueCollection
Dim rpcResponseArray As Byte()
rpcData.Add("method", "open service:6.0.2.5530")
rpcClient.Credentials = System.Net.CredentialCache.DefaultCredentials
rpcClient.Headers.Add("X-Vermeer-Content-Type",
"application/x-www-form-urlencoded")
rpcResponseArray = rpcClient.UploadValues(currentSite.Url.ToString() +
"/_vti_bin/_vti_aut/author.dll", rpcData)
The app however, is throwing back a 401 Unauthorized. I've been able to
validate the right context is passing through the app by checking
System.Security.Principal.WindowsIdentity.GetCurre nt().Name to see the right
user name. And if I create the credential cache manually, it works:
Dim myCreds As New NetworkCredential("userid", "password", "mydomain")
Dim myCache As New CredentialCache
myCache.Add(New Uri("http://dev.mydomain.net/"), "Basic", myCreds)
rpcClient.Credentials = myCache
Any thoughts on why impersonation wouldn't pass through the right
credentials to teh WebClient class in an ASP.NET web application?
Thanks!
Colin
Colin Bowern Guest
-
DefaultCredentials problem?
Hi All, this is the scenario: - "Hello World" web service on Machine A - winform client on Machine B - asp.net webform client on Machine B ... -
CredentialCache.DefaultCredentials not working!!!!!
Hi, I'm trying to use the CredentialCache.DefaultCredentials to pick up the credentials of the current user but its not working correctly. I've... -
CredentialCache.DefaultCredentials Not working
I am using the following method to call a web service from a windows application Dim a As New MachineReference.Service1 a.Credentials = s... -
401 Unauthorized when using DefaultCredentials
Hi all I hope this is the right newsgroup. I'm having a hard time making a web request from an authenticated process. Here's the scenario Managed... -
Get DefaultCredentials of one web app into another?
We have a web app which links to another ASP.NET web application (namely the Microsoft CRM). Our app is launched in a new browser window from a link...



Reply With Quote

