ASMX webservice url的问题

时间:2017-07-31 11:42:16

标签: c# asp.net .net web-services asmx

我正在尝试调用以下网络服务:

http://localhost:1591/CMSPages/WebService.asmx/GetMediaDetails

上面的网址工作正常。但是当我通过应用程序调用上面的url webservice时,它会更改url

来自

  

http://localhost:1591/CMSPages/WebService.asmx/GetMediaDetails

http://localhost:1591/CMSPages/en-us/WebService.asmx/GetMediaDetails

额外的

  

" EN-US"

在被调用时,

将被添加到应用程序中。

我无法阻止添加" en-US"在调用webservice时在应用程序中,因为它是应用程序中所需的功能。

我所能做的就是改变webservice url模式。你能帮忙实现这个目标吗?

我的代码如下:

[WebMethod(MessageName = "GetMediaDetails")]
[ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = false)]   
public MediaKitResponse GetMediaDetails(int nodeId, string cultureCode)
{
   ////..............some ...code....///
    }
    catch (Exception ex)
    {
        EventLogProvider.LogEvent(EventType.ERROR, "GetMediaDetails", "GetMediaDetails", eventDescription: ex.ToString());
        return null;
    }
    return objMediaKit;
}

}

0 个答案:

没有答案
相关问题