I have been building Asp.Net Web Services (.asmx) for a while now, and never run into this issue before.
System.ArgumentException: Invalid method name 'helloworld', method names are case sensitive. The method name 'HelloWorld' with the same name but different casing was found. Parameter name: methodName at System.Web.Services.Protocols.HttpServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
This happens when invoking the web service method directly from the browser when testing. If you call the service via Scripts everything works fine.
A solution to this problem is to give the methods a MessageName
<WebMethod(MessageName:="helloworld")> _ Public Function HelloWorld() As String Return "Hello World" End Function
The only different is that you are putting the MessageName property in lowercase.
Seems to fix the problem, not sure what causes the problem, so I will look into it more.
I am always interested in hearing back from those who read my blog. Please leave a comment if you found this useful, want to suggest any changes to my code, or anything else! Thanks!