I am trying to post webservice
platform
IIS 7
Visual Studio 2008
my code is
| Code |
|---|
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim proxy As System.Net.WebProxy = New WebProxy(
"https://1c.traffickurye.com/GunServisEkstre/ws/", True)
proxy.Credentials = New NetworkCredential("WS", "***",
"https://1c.traffickurye.com/GunServisEkstre/")
Dim k As New ServiceReference1.GunServisEkstrePortTypeClient("GunServisEkstreSoap")
k.ClientCredentials.UserName.UserName = "WS"
k.ClientCredentials.UserName.Password = "*****"
k.ClientCredentials.Windows.ClientCredential = proxy.Credentials
k.ClientCredentials.HttpDigest.ClientCredential = proxy.Credentials
k.ClientCredentials.Windows.AllowedImpersonationLevel =
System.Security.Principal.TokenImpersonationLevel.Impersonation
Dim data = k.CariHareketleri(2012, 12, "694")
GridView1.DataSource = data.Evraklar
GridView1.DataBind()
End Sub |
but receive this error:
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="1C:Enterprise 8.2"'.
The remote server returned an error: (401) Unauthorized.

