R
Rocio
I have a Default.asmx file that contains only this line:
<%@ WebService Language="vb" Codebehind="WebService.vb"
class="MyProgramBS.WebService" %>
All my WEbMethods are in MyProgramBS.WebService: e.g.
<WebMethod()> Public Function CanPayOnline(ByVal loginID As Long) as
Boolean()
When I test this, the default value of the namspace is
http://tempuri.org/
I tried modifying the code in Default.asmx as:
Imports System.Web.Services
<System.Web.Services.WebService(Namespace:="http://www.MyWebSite.net/WebService")>
_
Public Class WebService
Inherits System.Web.Services.WebService
' WEB SERVICE EXAMPLE
' The HelloWorld() example service returns the string Hello World.
' To build, uncomment the following lines then save and build the
project.
' To test this web service, ensure that the .asmx file is the
start page
' and press F5.
'
'<WebMethod()> _
'Public Function HelloWorld() As String
' Return "Hello World"
'End Function
End Class
but nothing happens. I think it is because I do not write any of my
web methods in the asmx file, but I redirect to WebService.vb . So how
can I change the Namespace this way?
<%@ WebService Language="vb" Codebehind="WebService.vb"
class="MyProgramBS.WebService" %>
All my WEbMethods are in MyProgramBS.WebService: e.g.
<WebMethod()> Public Function CanPayOnline(ByVal loginID As Long) as
Boolean()
When I test this, the default value of the namspace is
http://tempuri.org/
I tried modifying the code in Default.asmx as:
Imports System.Web.Services
<System.Web.Services.WebService(Namespace:="http://www.MyWebSite.net/WebService")>
_
Public Class WebService
Inherits System.Web.Services.WebService
' WEB SERVICE EXAMPLE
' The HelloWorld() example service returns the string Hello World.
' To build, uncomment the following lines then save and build the
project.
' To test this web service, ensure that the .asmx file is the
start page
' and press F5.
'
'<WebMethod()> _
'Public Function HelloWorld() As String
' Return "Hello World"
'End Function
End Class
but nothing happens. I think it is because I do not write any of my
web methods in the asmx file, but I redirect to WebService.vb . So how
can I change the Namespace this way?