A
author
Newbie Q...
When I hit the "ws.asmx" in a browser, I get
"Parser Error Message: Could not create type 'Service1'" ??
If I use the file "ws_ok.asmx" (without codebehind, but same code), I
get no errors.
Any 1 ??
TIA
-- ws.asmx --
<%@ WebService Language="vb" Codebehind="ws.vb" Class="Service1" %>
--
-- ws.vb --
Imports System
Imports System.Web
Imports System.Web.Services
<WebService(Namespace:="http://127.0.0.1/ws/")> _
Public Class Service1
Inherits WebService
<WebMethod()> _
Public Function Add(ByVal a As Integer, ByVal b As Integer) As
Integer
Return a + b
End Function
End Class
--
-- ws_ok.asmx --
<%@ WebService Language="vb" Class="Service1" %>
Imports System
Imports System.Web
Imports System.Web.Services
<WebService(Namespace:="http://127.0.0.1/ws/")> _
Public Class Service1
Inherits WebService
<WebMethod()> _
Public Function Add(ByVal a As Integer, ByVal b As Integer) As
Integer
Return a + b
End Function
End Class
--
When I hit the "ws.asmx" in a browser, I get
"Parser Error Message: Could not create type 'Service1'" ??
If I use the file "ws_ok.asmx" (without codebehind, but same code), I
get no errors.
Any 1 ??
TIA
-- ws.asmx --
<%@ WebService Language="vb" Codebehind="ws.vb" Class="Service1" %>
--
-- ws.vb --
Imports System
Imports System.Web
Imports System.Web.Services
<WebService(Namespace:="http://127.0.0.1/ws/")> _
Public Class Service1
Inherits WebService
<WebMethod()> _
Public Function Add(ByVal a As Integer, ByVal b As Integer) As
Integer
Return a + b
End Function
End Class
--
-- ws_ok.asmx --
<%@ WebService Language="vb" Class="Service1" %>
Imports System
Imports System.Web
Imports System.Web.Services
<WebService(Namespace:="http://127.0.0.1/ws/")> _
Public Class Service1
Inherits WebService
<WebMethod()> _
Public Function Add(ByVal a As Integer, ByVal b As Integer) As
Integer
Return a + b
End Function
End Class
--