所以我有一个 Web 服务方法,它位于:
mysite.com/mywebservice.asmx?op=GetOrders
GetOrders
如果他们只是导航到,有什么方法可以自动调用该方法:
mysite.com/mywebservice.asmx
所以我有一个 Web 服务方法,它位于:
mysite.com/mywebservice.asmx?op=GetOrders
GetOrders
如果他们只是导航到,有什么方法可以自动调用该方法:
mysite.com/mywebservice.asmx
Use urlMappings in Web.Config.
Defines a mapping that hides the real URL and maps it to a more user-friendly URL.
<urlMappings enabled="true">
<clear />
<add url="mysite.com/mywebservice.asmx" mappedUrl="mysite.com/mywebservice.asmx?op=GetOrders" />
</urlMappings>
But I think this will effect your other methods, like if you call a mysite.com/mywebservice.asmx?op=SomeOtherMethod
this would take you GetOrders
, I am not sure about it, but you can try.