R
Ramdas
I am using the following method to call a web service from a windows application
Dim a As New MachineReference.Service1
a.Credentials = s 'System.Net.CredentialCache.DefaultCredentials
Dim strret As String = a.HelloWorld()
a.Dispose()
a = Nothing
MsgBox(strret)
My web site has only Integrated security set.
This web service works when I try using the browser. But doesnt work when i try the windows application logged into the pc as sthe same user.
It gives the following error
An unhandled exception of type 'System.Net.WebException' occurred in system.web.services.dll
Additional information: The request failed with HTTP status 401: Access Denied.
The same code works on Other PCs in the network
Also the same code works when I set credentials using the following code
Dim cache As System.Net.CredentialCache = New System.Net.CredentialCache
cache.Add(New Uri(a.Url), "Negotiate", New System.Net.NetworkCredential("user", "password", ""domain))
a.Credentials = cache
We want to use defaultcredentials. Any suggessions?
Dim a As New MachineReference.Service1
a.Credentials = s 'System.Net.CredentialCache.DefaultCredentials
Dim strret As String = a.HelloWorld()
a.Dispose()
a = Nothing
MsgBox(strret)
My web site has only Integrated security set.
This web service works when I try using the browser. But doesnt work when i try the windows application logged into the pc as sthe same user.
It gives the following error
An unhandled exception of type 'System.Net.WebException' occurred in system.web.services.dll
Additional information: The request failed with HTTP status 401: Access Denied.
The same code works on Other PCs in the network
Also the same code works when I set credentials using the following code
Dim cache As System.Net.CredentialCache = New System.Net.CredentialCache
cache.Add(New Uri(a.Url), "Negotiate", New System.Net.NetworkCredential("user", "password", ""domain))
a.Credentials = cache
We want to use defaultcredentials. Any suggessions?