K
Kirk
I have a WS called "IWeb", which I define within the page class like
this:
Dim service As IWeb.WebService
I then have a button that calls the web service like this:
Dim header As IWeb.IWebAuthendicationHeader = New
IWeb.IWebAuthendicationHeader()
Dim strName As String = Request.ServerVariables("LOGON_USER")
header.Username = strName
header.Password = "ThisPW"
header.Encrypted = "True"
service = New IWeb.WebService()
service.IWebAuthendicationHeaderValue = header
Dim result As String = String.Empty
result = service.IsUserHere(My.Settings.WS_Role_Admins)
lblWSResult.Text = result
This works (with the code within the page-behind section), but I
really need this code to reside within a VB code MODULE. However, as
soon as I try to do this, I start getting errors. If I even add the
"Dim service As IWeb.WebService" definition, it gives me this error:
"Type 'IWeb.WebService' is not defined."
I have tried moving this definition to different areas within the
module's class, but I can't seem to get past this error. I think this
is one of those things where you can't call certain procedures outside
of a page's code-behind file (?). I have also experimented with
adding an Imports statement at the start of my module's class, with
similar errors.
I would greatly appreciate any suggestions & again, sorry for posting
a non-AJAX question.
Thank you!
this:
Dim service As IWeb.WebService
I then have a button that calls the web service like this:
Dim header As IWeb.IWebAuthendicationHeader = New
IWeb.IWebAuthendicationHeader()
Dim strName As String = Request.ServerVariables("LOGON_USER")
header.Username = strName
header.Password = "ThisPW"
header.Encrypted = "True"
service = New IWeb.WebService()
service.IWebAuthendicationHeaderValue = header
Dim result As String = String.Empty
result = service.IsUserHere(My.Settings.WS_Role_Admins)
lblWSResult.Text = result
This works (with the code within the page-behind section), but I
really need this code to reside within a VB code MODULE. However, as
soon as I try to do this, I start getting errors. If I even add the
"Dim service As IWeb.WebService" definition, it gives me this error:
"Type 'IWeb.WebService' is not defined."
I have tried moving this definition to different areas within the
module's class, but I can't seem to get past this error. I think this
is one of those things where you can't call certain procedures outside
of a page's code-behind file (?). I have also experimented with
adding an Imports statement at the start of my module's class, with
similar errors.
I would greatly appreciate any suggestions & again, sorry for posting
a non-AJAX question.
Thank you!