【问题标题】:How to get method name of called webservice.asmx on the server side如何在服务器端获取调用的 webservice.asmx 的方法名称
【发布时间】:2018-12-20 09:21:00
【问题描述】:

我正在客户端从我的 Web 服务调用我的一些 WebMethod。它是 .NET webservice.asmx。然后,当我首先在服务器端处理这个请求时,它会转到 AuthModule:IHttpModule。我需要有关方法名称的信息。

我需要获取服务器端调用的webservice方法的名称信息。

HttpContext.Current.Request.Url.AbsolutePath;

返回 .../serviceName 但我需要识别调用了哪个方法。有什么想法吗?

【问题讨论】:

  • 没有方法名你怎么调用web方法?
  • im 在客户端调用此 Web 服务的方法。然后当我在服务器端处理这个请求时,它首先进入 AuthModule:IHttpModule。我需要有关方法名称的信息。

标签: c# .net web-services asmx


【解决方案1】:

如果您使用的是 SOAP,请尝试以下操作:

HttpContext.Current.Request.Headers["SoapAction"]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-07-03
    • 2014-07-11
    • 2013-07-07
    • 1970-01-01
    • 1970-01-01
    • 2011-10-27
    • 2022-05-11
    相关资源
    最近更新 更多