I am trying to use the follwing code to force user agent for the webbrowser in my app.
webBrowser.Navigate("http://localhost/run.php", null, null, "User-Agent: Here Put The User Agent");
However VS wont accept this code, giving me error.
No overload for method ‘Navigate’ takes 4 arguments
What am I missing?
According to this and this there is no
Navigatewith more than one parameter available in Silverlight – so VS is right… the code you show would work with .NET 4 but not with Silverlight.I don’t see an option to set any header in the Silverlight
WebBrowsercontrol so I would suspect that what you want to is not possible with Silverlight… depending on your usecase it might be possible to use WebClient and/or HttpWebRequest to achieve what you want (BEWARE these don’t render!).