The markup and code-behind file contents for my .NET Web Service are as follows (pretty much what VS generated):
Services.asmx:
<%@ WebService Language="VB" CodeBehind="Services.asmx.vb" Class="Services" %>
Services.asmx.vb:
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class Services
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello World"
End Function
End Class
When I try to access the web service, I get:
Parser Error Message: Could not create type 'Services'
I've tried qualifying the Services class specification in the markup with a namespace, to no avail.
When I put the code-behind in the same file as the .asmx, everything works fine.