webBrowser bug
I want to join youtube with web browser , but I get this message,any idea?
the browser used in visual studio is just IE (Internet Explorer) and since most websites doesn't support IE anymore, most popular sites like YouTube, Twitch, amazon, stack overflow ;) etc. use modern elements and the html/js/css in the website may not work with IE, so most websites either try to load the website or just show a "You need to update your browser version screen" (what you are experiencing right now)
EDIT: i found how to use Webview (not IE) so websites can work properly
https://blogs.windows.com/msedgedev/2018/05/09/modern-webview-winforms-wpf-apps/
(NOTE: This is WebView1, Not The Newer WebView2, Please See quaabaam 's answer, here is the link for the answer he/she gave "
Web Browser Control & Specifying the IE Version")
(NOTE 2: this link is from 2018 and its been 4 years now so im unsure if the code sample on the Microsoft blog post will work, this is due to .NET 6 and how it changes how you make methods and many more stuff)
Related
I was wondering if anyone knows what is going to happen with the win forms browser control in the .net framework after IE 11 support is dropped next month. From my understanding the browser control uses an IE shell, but if IE is no longer supported what will happen? are we just SOL? are the porting it to use Edge? just wondering if anyone has heard, I cant seem to find any info. Thanks!
Microsoft is not discontinuing support for IE 11; they're simply not developing another version of IE. According to Lifecycle FAQ—Internet Explorer and Edge:
"Internet Explorer 11 is the last major version of Internet Explorer. Internet Explorer 11 will continue receiving security updates and technical support for the lifecycle of the version of Windows on which it is installed."
Therefore, the answer is:
"The Winforms Browser control will keep working the same way it was before."
Is it possible to control and instantiate a Chrome browser from C#? Things like opening a new window, changing the URL, reloading the tabs, etc.
I've had a look for a C# Chrome API but can only find a Javascript ones on https://developer.chrome.com/, and the best I could find here was C# - How to control chrome browser - the best answer was to check out the API.
There is an API available for that. It's called 'Selenium', and has a Chrome-specific third party extension.
http://www.seleniumhq.org/
Check that link.
Doing a quick Google search for "chrome C# api" turned up some results I think you may like to consider
I thought the following were particularly promising, if you're willing to accept the concession of using Chrome's developer tools:
Automating Chrome Browser from C#
ChromeDevTools; a C# Library to interact with Chrome's Developer Tools
Chrome Debugging API
Are you looking for something like CEF Sharp?
It's an open source project that allows you to embed Chrome into your .NET application. So you can have those C# controls interact with the browser.
Anyone who has tried Puppeteer? Article about it here. (not C# specific)
I am using a web application which supports VLC plugin to run the video streaming.
For this i have done some approach as follows :
1. Open Chrome and Open url : chrome://flags/#enable-npapi
2. Enable NPAPI
3. Restart the browser.
When i applied above 3 steps then it works fine but from some days chrome doesn't supports these
npapi plugins.
So, What is the solution for it so that i can run
vlc plugin
in chrome as my asp.net application is based on it.
Sorry for my bad English!
From Chrome 45 and foward NPAPI is no longer supported it has been announced for a while now that they would do that by version 45, if VLC plugin relies on it then you might need to wait for an update on the plugin itself or move to other technologies.
The NPAPI page on Chromium.org lists some alternatives:
HTML5 Media Elements
WebRTC
In my opinion, the best thing to do would be to move to one of the newer technologies as Chromium team will probably not revert the depreciation of NPAPI. You could also warn your users to not update Chrome, but that would leave them open to vulnerabilities(Also, most users probably have auto-update enable so...).
Also, this question might be useful
As NPAPI is no longer supported in Chrome, you need to use different web plugin for video streaming, that's all. Browse yourself, there are several good stable ones, I use VXG plugin.
I'm developing an MVC app.
If I (on my Surface Pro) goes to http://www.whatbrowser.org/ it correctly says IE 10.
But if I go to my MVC app and print out the Request.Browser.Version, it returns 7.
Any idea why? Is Request.Browser.Version broken?
Thanks
Some of this is touched on in Detect Internet explorer browser version problems.
Last I knew Request.Browser uses the *.browser files that come with the installs of ASP.NET, and easily get out of date. Microsoft releases updates to them every so often, but not often enough. Currently there are some issues with webform pages breaking on IE10 without updated browser files.
Like the comments have said, browser detection is very broken. If you need to detect the browser, at the very least shy away from using the user agent string, and seriously consider why you need to know exactly what browser is used.
Request.Browser.Version doesn't always return the 'correct' browser version for IE because of many factors including compatibility view, meta tags etc.
You would be better off detecting browser capabilities instead. Further reading here: http://msdn.microsoft.com/library/3yekbd5b
As a personal preference, it would be best to detect the OS instead of the browser. Most of the common HTML5/CSS3 features are supported in IE9 and above and IE9 requires Windows Vista and up. The best way to do this using the User Agent is by checking the Trident. If there is compatibility view enabled via the browser or by using meta tags by the app itself, the wrong 'version' is returned but the Trident remains correct.
PS. This isn't fool proof but this would work most of the time.
Further reading about Trident here: http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx#PltToken
I am searching for a substitute of the WebBrowser control in .NET which can handle HTTPS. This question is similar here on Stack Overflow, but none of these controls offer HTTPS.
btw, just to mention, I tried all these
GeckoFx - development stopped
Se7en - this is actually continued GeckoFx
Webkitdotnet - no one replying on forum
but none of them support HTTPS, so I'm kind of stuck here :/.
Also, to mention, WebBrowser control that comes with .NET framework works just fine with HTTPS, but the reason I can't use it is because my app uses a lot of javascript that IE refuses to render, and for example Firefox (gecko engine) or Chrome (webkit) work just fine.
So, please if someone knows a good control that can do this (can be Webkit or Gecko wrapper, it doesn't mind, as long as it's not an IE wrapper).
Thanks!
Since I, apparently, cannot write a comment I'll just drop my 2 cents here..
Beginning with the next release (R14), MozNET (called 'Se7en' in the OP's post), will have support for HTTPS/SSL and the ability to accept/deny certificates.
EDIT: The R15 release will have the SSL handling for sure. I had to hold off on it because of a weird bug.. But, it's coming soon!
Your options here seem a bit limited. With IE8 and IE9 the JavaScript is not so bad, but if there is no possibility for your users to upgrade, I would suggest looking at a few things:
Mono.WebBrowser
Mozilla XulRunner - This is not directly a .NET control, but could be useful anyway.
Update:
I recently ran into this, might be interesting:
.Net binding for the Chromium Embedded Framework
After long googling I finally ended up using the same as I was using before. So Webkit from http://sourceforge.net/projects/webkitdotnet and I ended up purchasing a SSL certificate for my domain and now all is fine.