Calling a webservice via ASP.Net

G

Guest

Hi,
I am trying to write my first web service. I have the following code:


Imports System.Web.Services
Public Class Service1
Inherits System.Web.Services.WebService
Private _ErrorText As String


<WebMethod()> Public Function Verify(ByVal UserName As String,
ByVal Password As String) As Boolean
'Do user verification stuff here.
End Function


<WebMethod()> Public Function ErrorMsg() As String
Return _ErrorText
End Function
End Class


This works fine. I am trying to write an ASP.Net application in
notepad. How do I go about calling the webservice? Also, is there a way

to have public readonly properties that are accessable via an ASP.Net
page in the webservice.


Thanks
 
G

Guest

hi,

In order to use your web service within another application without using
VS, you need to generate the corresponding class with WSDL tool or DISCO
 
R

richard.hein

You cannot expose properties via webservices in the manner you suggest.

R. Hein
 
G

Guest

OK. I made a .VB file using the wsdl application. So how do I go about
calling the service?

Thanks again for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top