I have the following web method:
<WebMethod()> _
Public Function Test_CurrentCredentials() As String()
Dim tmpArr(2) As String
tmpArr(0) = "User: " &
System.Threading.Thread.CurrentPrincipal.Identity. Name
tmpArr(1) =
System.Threading.Thread.CurrentPrincipal.Identity. AuthenticationType.ToString
tmpArr(2) =
System.Threading.Thread.CurrentPrincipal.Identity. IsAuthenticated.ToString
Return tmpArr
End Function
In my app I call it this way:
Dim tmpArr() as string
Dim svc As New WebReference.Service1
svc.Credentials = System.Net.CredentialCache.DefaultCredentials
tmpArr = svc.Test_CurrentCredentials
When I run the app I get the following error:
The request failed with HTTP status 401: Access Denied
I have Disabled Anonymous authentication for my Web Service folder. Only
Integrated Windiows Authentication is active.
What is the problem?
Tia