为WPF WebBrowser控件指定用户代理 [英] Specify User Agent for WPF WebBrowser Control

查看:144
本文介绍了为WPF WebBrowser控件指定用户代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要更改WPF WebBrowser控件使用的默认用户代理.我查看了控件背后的IWebBrowser2对象的属性,并尝试通过在调用导航"时将其指定为

I need to alter the default User Agent used by the WPF WebBrowser control. I have looked at the properties of the IWebBrowser2 object behind the control, and tried specifying the user agent by specifying it when calling "Navigate" as Suggested Here

这可能吗?

推荐答案

URLMkSetSessionOption. http://blogs.msdn.com/b/ieinternals/archive/2009/10/08/extending-the-user-agent-string-problems-and-alternatives.aspx

URLMkSetSessionOption. http://blogs.msdn.com/b/ieinternals/archive/2009/10/08/extending-the-user-agent-string-problems-and-alternatives.aspx

这篇关于为WPF WebBrowser控件指定用户代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆