ok i am not very good with asp.net but am trying to use soap authentication on my webservice this what i done so far and i dont no what else to do.
Public Class AuthenticationHeader
Inherits SoapHeader
Public username As String
Public password As String
End Class
then in my webservice i have done this:
Imports
AuthenticationHeader
Imports
System.Web
Imports
System.Web.Services
Imports
System.Web.Services.Protocols
Imports
System.Data
Imports
System.Data.SqlClient
Public Class StockPriceInherits System.Web.Services.WebService
Public Auth As AuthenticationHeader
Function authenticate(ByVal a, ByVal b) As Boolean
Dim test As String
Dim test1 As String
If Auth.username = test And Auth.password = test1 Then
Return True
Else
Return False
End If
End Function
<WebMethod(), SoapHeader("auth")> Public Function GetStockPrice() As DataSet
If authenticate() = True Then
run my prices stuff etc
else
return false
End if
end sub
if anyone knows what wrong that would be great or somewhere i can get a really detailed tutorial on soap authentication
regards lea dixon