我有一个 asmx web 服务,方法如下
[WebMethod]
public string LoadRegions(Guid id)
{
throw new NotImplementedException();
}
当我尝试调用此方法时,我收到此异常:
System.InvalidOperationException: LoadRegions Web Service method
name is not valid.
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
如果我将参数类型从 Guid 更改为字符串,问题就会消失。建议?出于测试目的,我使用 Firefox 中的此 url 调用服务:
http://localhost:81/services/ContactService.asmx/LoadRegions
?id=6C388126-5787-4B63-AAFE-5BCC4EA4DF83
有什么建议么?