.NET Framework 4 中的 Web 服务的 Web 方法是否可以有多个名称或别名?
目前,我正在努力更改 Web 服务中某些 Web 方法的名称。
[WebMethod(MessageName ="HelloWorld2",MessageName = "HelloWorld")]
public string HelloWorld()
{
return "Hello World";
}
我想知道:同一个方法是否可以有不同的消息名称?或者有相同结果的东西?
Currently, I'm working on changing the name of some web methods in a web service.
[WebMethod(MessageName ="HelloWorld2",MessageName = "HelloWorld")]
public string HelloWorld()
{
return "Hello World";
}
I wonder: is it possible to have different message names for the same method? Or something with the same result?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的第一个方法是从旧方法调用新的实现。我对想法持开放态度
My first approach is calling the new implementation from the old method. I'm open to ideas