N
Niall Smith
I am trying to create a ASP.net web service. I have used the New Project> ASP.Net web service generator. And I have added the lines of code:
<WebMethod()> Public Function HelloWorld() As String
HelloWorld = "Hello World"
End Function
<WebMethod()> Public Function getRating(ByVal Input As String) As String
If Input = 1 Then
Return "x"
Else
Return "y"
End If
End Function
When I build and browse, view in browser or type the URL http://localhost/WebService1/Service1.asmx in a browser I get "No page to display" in the browser and the following code in service1.asmx
<%@ WebService Language="vb" Codebehind="Service1.asmx.vb" Class="WebService1.Service1" %>
I beleive I should get a displayed web page with an input and ability to click "getRating"
Also if I type http://localhost/WebService1/Service1.asmx?wsdl I don't get a generated WSDL file the same thing happens as described above. I don't think there is anything wrong with the code as I copied it straight from a training exercise.
What could be wrong with my VStudio installation
<WebMethod()> Public Function HelloWorld() As String
HelloWorld = "Hello World"
End Function
<WebMethod()> Public Function getRating(ByVal Input As String) As String
If Input = 1 Then
Return "x"
Else
Return "y"
End If
End Function
When I build and browse, view in browser or type the URL http://localhost/WebService1/Service1.asmx in a browser I get "No page to display" in the browser and the following code in service1.asmx
<%@ WebService Language="vb" Codebehind="Service1.asmx.vb" Class="WebService1.Service1" %>
I beleive I should get a displayed web page with an input and ability to click "getRating"
Also if I type http://localhost/WebService1/Service1.asmx?wsdl I don't get a generated WSDL file the same thing happens as described above. I don't think there is anything wrong with the code as I copied it straight from a training exercise.
What could be wrong with my VStudio installation