Securing web service

From: John (jonashbaugh@hotmail.com)
Date: 11/25/02


From: "John" <jonashbaugh@hotmail.com>
Date: Mon, 25 Nov 2002 14:00:32 -0800


Hello,

        We have a webservice that we only want the website to access. I have
set up the webservice adding in <identity impersonate="true"/> under
web.config. On the submit button event I have the following code. I still
get the 401 access denied error. Am I missing something else?

Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles btnLogin.Click

Dim Service As New localhost.Service()

Dim credentials As System.Net.NetworkCredential = New
System.Net.NetworkCredential("testuser", "zxcvb", ".")

Service.Credentials = credentials

Dim Info As String = Service.Login(LCase(txtUser.Text),
LCase(txtPassword.Text), LCase(txtCompany.Text))

other code......

end sub