I'm trying to run an webpage inside a Webbrowser control wich contains a connection to an Websocket. The control can't connect to the Websocket. When I tested in IE, everything runs ok, but in the Webbrowser control inside Visual Studio, the page can't connect to the Websocket. I tried other pages that contains script to detect browser support for Websockets, when it runs in IE, the page show that Websocket runs with success, but when I'm try to run the same page on Webbrowser control, the page says that webcontrol can't run. How can I do to solve this problem? Very thank you.
Asked
Active
Viewed 3,432 times
1
-
1Not completely sure its relevant, but what version of .net/vs are you using? – Jon Egerton Jan 28 '14 at 10:07
-
I'm using Visual Studio 2013 and Internet Explorer 11 on Windows 7 – Augusto Will Jan 28 '14 at 11:24
-
1Ok, my answer will hopefully point you in the right direction then. – Jon Egerton Jan 28 '14 at 11:27
1 Answers
3
The problem is that the webbrowser control, while using the local IE as a basis, is more locked down (or maybe better to say "differently configured") by default.
The ability to control this is called Feature Control and you can read about it on MSDN here
In terms of solving your actual problems, a similar question has been solved with code provided in this answer to an equivalent question on C#. Note the tweaks in the subsequent answer as well.

Community
- 1
- 1

Jon Egerton
- 40,401
- 11
- 97
- 129
-
Jon, very thank you. This solution works in any Windows version with the correct framework installed? – Augusto Will Jan 28 '14 at 11:28
-
1It should work where the underlying IE install also supports websockets I think - you're not going to get websockets working on a windows running IE9 for example. – Jon Egerton Jan 28 '14 at 11:30
-
Perfect, it works! Thank you Jon, very very thank you. God Bless you. – Augusto Will Jan 28 '14 at 11:40
-
Is possible to make the .Net Webbrowser control render form elements, like buttons, input text, with winform elements appearance? Using the visual styles of OS to look like an native Windows application not an page displayed in IE? – Augusto Will Jan 29 '14 at 03:28
-
That's worth a separate question. Why not ask it and post a link in comments here so we can find it. – Jon Egerton Jan 29 '14 at 06:43
-
yes, sorry. http://stackoverflow.com/questions/21422498/net-webbrowser-display-html-form-elements-with-visual-style-of-native-os – Augusto Will Jan 29 '14 at 06:53