It's in VB but you shouldn't have any problems with it. MSDN has some good
reading on NetworkCredential and the like.
Dim l As New localhost.MyWebService
Dim cred As System.Net.ICredentials 'Or networkcredentials, whatever you
prefer
cred = New System.Net.NetworkCredential(Me.txtUser.Text.Trim,
Me.txtPassword.Text.Trim)
l.Credentials = cred
dim SomValue as string = l.SomeService
> using c# in a windows application.
>
[quoted text clipped - 18 lines]
> packet myself and then use manual code to send it on to the webservice....
> this is not a desirable option.
after a bit of looking i found this...
Pass Current Credentials to an ASP.NET Web Service
http://support.microsoft.com/?kbid=813834
> It's in VB but you shouldn't have any problems with it. MSDN has some
> good reading on NetworkCredential and the like.
[quoted text clipped - 30 lines]
>> packet myself and then use manual code to send it on to the
>> webservice.... this is not a desirable option.
Jared - 11 Sep 2004 12:44 GMT
Syd,
I don't think that will work in this scenario, Old specifically stated
that he needed to use Basic Windows Authentication which passes your
credentials in base64 encoded clear text. Windows Integrated uses a hash,
which "cannot" be decrypted, it just verifies the signature. Since basic
can't verify the identity, it should not allow access.
Your method works great for Windows Integrated.
Jared
> after a bit of looking i found this...
> Pass Current Credentials to an ASP.NET Web Service
[quoted text clipped - 34 lines]
>>> packet myself and then use manual code to send it on to the
>>> webservice.... this is not a desirable option.