Reputation: 1155
I have a simple form with an Awesomium webcontrol going to a website.
I found how to change the useragent in C++ but nothing for vb.net:
code for C++ http://wiki.awesomium.com/general-use/changing-the-user-agent.html
Could someone help me with this?
Upvotes: 0
Views: 1184
Reputation: 59
I realize this is an old thread and you've probably found the answer, but I added this code to my WPF VB.net app and it worked.
Dim config As New Awesomium.Core.WebConfig()
If Not Awesomium.Core.WebCore.IsInitialized Then
Awesomium.Core.WebCore.Initialize(New Awesomium.Core.WebConfig() With { _
.HomeURL = New Uri("https://www.awesomium.com"), _
.RemoteDebuggingPort = 2229, _
.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
})
End If
It didn't fix the problem I was trying to fix, however it did make it so Chrome doesn't report that I'm using an old version.
Upvotes: 1
Reputation: 10931
I note your answer would be here if the documentation was up to date :-(
The best we can do is see what they've said for "WPF WebControl Initialization" here, and in summary I believe what I said in my comment holds:
WebCore.Initialize(config As WebConfig)
.Note also the commentary about when things occur.
Upvotes: 0