【问题标题】:detect if request is from mobile [duplicate]检测请求是否来自移动设备[重复]
【发布时间】:2016-10-10 13:04:04
【问题描述】:

我正在编写一个从网页调用的网络服务,我需要知道请求是否来自网络或移动浏览器,包括嵌入的 android webview, webservice 是 c# , svc webservice。

【问题讨论】:

    标签: c# web-services svc


    【解决方案1】:

    你可以得到调用User-Agent

    WebOperationContext.Current.IncomingRequest.Headers["User-Agent"];
    

    并检查它是否移动。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-28
    • 2013-03-14
    • 2011-02-12
    • 2011-02-08
    相关资源
    最近更新 更多