which version the webBrowser engine in VS 2012 is - visual-studio-2012

This is a newbie question about what is the version of the built-in webBrowser engine in visual studio 2012, it says 4.5.0 or something but i mean corresponding to Internet Explorer versions, is it IE 8, 9 or 10.
and if it is IE 8 or 9, is it possible to embed some other browser engine like Chrome or Firefox?
Thanks in advance.

I've downloaded VS 2013 and "surprisingly" the User Agent was MSIE 7.0 still, nothing changed since the prior versions.. Thanks Microsoft!
UPDATE 2015
I've just downloaded VS 2015 couple days ago and did the same, set the webBrowser URL to whatsmyuseragent.com page and shockingly the User Agent String result was:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)
SO I decided to use this website www.whatismybrowser.com instead and I got this:
So it was IE11 but the problem is with the IE7 compatibility view which ruins it everytime, this why the previous website was showing MSIE 7.0 in the userAgent, and I guess the same was true for VS 2010, VS 2012 and VS 2013.
To "force" rendering the webpage in the latest IE -or versions other than the IE7 compatible one- one of the following could be done:
First : if you have a specific webpage/website to display in the embedded webBrowser and you have control over it add this meta tag to the header:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Where IE=edge causes the browser control to render the content in the highest available document mode.
Second : for targeting a specific version of the browser, you can use the FEATURE_BROWSER_EMULATION registry key.
For detailed information:
MSDN - Controlling webBrowser control compatibility.
How do I turn off Compatibility View on the IE WebBrowserControl in a WinForms app?

Related

Why chrome sends all agent names as part of user-agent header

Is there any reason why chrome browser (71 probably earlier version too) sends all browser names as part of its user agent parameter ?
This is what i see in the console. Is this expected, Will this affect the client information if the server wants to know/log the agent names ?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
They all have Mozilla in beginning of their Useragent because they follow standard mozilla rendering back in 2000 era. Most browsers share some of each other rendering engines, that's why their useragent often consist of similar values.
Browsers have came a long way to reach their current state. Current user-agents have to do with a little bit of browsers history. When there was a fight between Firefox and Internet Explorer, Chrome appeared. Some websites would ask Firefox users to switch to Internet Explorer for better rendering (because their website was old and not compatible with Firefox) and some would advice Internet Explorer users to switch to Firefox for modern rendering and better performance.
There was some forks of Firefox which also used similar user agent, "Gecko/####" which say this browser is using Gecko engine.
Websites check if a browser have "Gecko" in its user agent and decide to show modern design. Chrome is using Apple WebKit engine to render HTML, but in order to avoid those websites show recommendation for Internet Explorer, added "Like Gecko" to it's useragent.
Now that Chrome is top browser, have a look at Microsoft Edge 14: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14931
As Internet Explorer reputation got very bad, Microsoft could not use any user agent string that could make websites think Edge is Internet Explorer. therefor, by putting Chrome, Safari, AppleWebKit, "Like Gecko" is satisfy websites that are looking for this strings to avoid showing a message to switch to Chrome. Microsoft is using "AppleWebKit" in it's useragent even when they are not using AppleWebKit yet. (They will start using in next versions of Edge)

Detecting “Tablet/Touch Mode” in Edge using JavaScript on Windows 10?

This question was asked before, but the answers are not exactly what I need.
I need to distinguish in Microsoft Edge if it's a tablet or not (Desktop).
1) The following thread:
Can you detect "Tablet Mode" in Edge and IE11 using JavaScript on Windows 10?
worked indeed, but I'm afraid that in the next version Microsoft will change the behavior.
How can I be sure that they won't?
Answers with if condition of window.PointerEvent do not work at all, since it's defined in Desktop.
I can't use CSS Media Queries Interaction media features as suggested here:
Is there any way to detect if user has launched microsoft edge tablet or desktop browser?
Here are the hardware specific differences in the Edge browser capabilities:
The only differences are due to certain device-specific qualities – for example, codec support may be different on phones due to missing hardware acceleration, and Flash is not supported on Windows 10 Mobile. Because Windows 10 Mobile has a different background model, RTC (Real-Time Communications) APIs are also currently not supported. Finally, Windows 10 Mobile does not support Flash in order to provide a modern, touch-focused, and power-efficient experience appropriate for a mobile device. Because of this, Flash is not supported in Microsoft Edge in Continuum.
To detect RTC capabilities, use the following code:
if (RTCRtpCapabilities)
{
initRTC();
}
function initRTC()
{
var recvAudioCaps = RTCRtpReceiver.getCapabilities("audio");
var recvVideoCaps = RTCRtpReceiver.getCapabilities("video");
var sendAudioCaps = RTCRtpSender.getCapabilities("audio");
var sendVideoCaps = RTCRtpSender.getCapabilities("video");
}
Embedding a Flash movie which uses an ExternalInterface call would be the easiest way to detect Flash.
The properties of the navigator object should be able to distinguish tablet from phone. For example:
navigator.cpuClass
should return x86 for Surface devices, but other for phones.
Also, the user agent changes when casting a phone display to a TV. It goes from:
Microsoft Edge UA (Mobile)
Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; Microsoft; <Device>) AppleWebKit/<Rev (KHTML, like Gecko) Chrome/<Rev> Mobile Safari/<Rev> Edge/<Rev>
to:
Microsoft Edge UA (Continuum)
Mozilla/5.0 (Windows NT 10.0; ARM) AppleWebKit/<Rev> (KHTML, like Gecko) Chrome/<Rev> Safari/<Rev> Edge/<Rev>
compared to the desktop:
Microsoft Edge UA (Desktop)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/<Rev> (KHTML, like Gecko) Chrome/<Rev> Safari/<Rev> Edge/<Rev>
References
Microsoft Edge and Continuum: Your desktop browser on Mobile
Microsoft Edge Dev Guide: Object RTC API
ORTC Specification: dictionary RTCRtpCapabilities
Flash Player guidance for Internet Explorer 11 and Microsoft Edge
Minimum Hardware Requirements: Windows 10
Continuum for Phones FAQ
clientInformation object
Device Fingerprint Help
Security Error when trying to call ActionScript function from JS
The Windows 10 Browser Conundrum
how to tell if android user came from home screen app
Configuring Web Applications

What is the browser engine of the Sogou browser?

Title pretty much says it all. I am developing for a client that serves a large customer base in China, so I need to make sure the site works in local Chinese browsers. I am experiencing issues with Sogou browser (which I'd never even heard about before today). In order to troubleshoot these issues in an environment I am more familiar with, I wanted to see if I could reproduce these issues in another browser which uses the same engine. If only I knew what engine that was…
Update:
As far as I've been able to find out, Sogou is a dual-engine browser. One engine is Webkit and the other supposedly is Trident, specifically the version that's in IE9. This however, does not correspond to what I am seeing, as the page is clearly rendered differently from what it is in IE9. Maybe it's IE9 in quirks mode?
I've seen a couple references to a dual Trident/Webkit engine. Apparently it can do both; Trident might be either their own build, or the most recent version included with Windows. I have IE9 installed but it's behaving like IE7, which came default on my computer. Sogou-based browsers can be detected and offered to switch to the Webkit engine, like in this code example.
From the Trident useragent string:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath.3; Media Center PC 6.0; SE 2.X MetaSr 1.0
Now I'm just guessing this means it uses the IE7 standards mode as default when it's rendering webpages. But then again IE doesn't like reporting the same useragent all the time either...
From the Webkit useragent string (looks Sogou-branded):
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.802.30 Safari/535.1 SE 2.X MetaSr 1.0
I was able to change user agents pretty easily here. "高速" translates roughly to "high speed".
I don't know how reliable the information is, but channel9.msdn.com has a page that suggest it is (or will be?) the Webkit engine.
Chinese dual engine browsers have webkit and Trident. They use webkit by default and use Trident for compatibility mode. Apparently there were a lot of issues reguarding IE-centric websites. I think that has largely passed. For instance, Maxthon dropped the Trident engine in version 3+

webbrowser control version

I've read somewhere that the webbrowser control in MS visual studio uses the same engine as the IE installed on my pc. Despite that I found out that this is not correct. And to prove my assumption I used various online browser detecting sites. I present the results here:
(1) IE installed on my pc (both 64-bit and 32-bit):
Browser Information: .
Browser: Microsoft Internet Explorer
Browser Version: 9.0
User Agent String: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
(2) webbrowser control (C#):
Browser Information:
Browser: Microsoft Internet Explorer
Browser Version: 7.0
User Agent String: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
I began to search about it because I had compatibility problems with the webbrowser control whenever I tried to access a specific site (which works fine despite the warnings).
I used gecko 12 to simulate firefox but the site detected that I wasn't using the firefox and I got the warning message again...
So the question is: how can I "cheat" and by-pass detection so that I won't get warning messages after every click? I'm looking for a programmatic way to do so.
It seems that there is no easy way to do this with programming. It's all in the registry.
I can't understand why...
Anyway, the answer is here.
The webbrowser control uses the compatibility mode by default. Even if IE won't use the compatibility mode, the control will.
Webbrowser control uses IE installed on machine. By default it is running in IE 7 compatability mode.
To set your compatability mode you need to list your application in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION with desired compatability mode.

Setting up the SharePoint+Silverlight Blueprint Colleague Viewer Web Part

I'm trying to get the Silverlight Colleague Viewer webpart to work on my test server. The silverlight player renders the Viewer but it fails when it attempts to access the WCF service. The error below is caught by IE 8.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR >1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.2; .NET CLR >3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 14 Apr 2009 21:45:18 UTC
Message: Unhandled Error in
Silverlight 2 Application An exception
occurred during the operation, making
the result invalid. Check
InnerException for exception details.
at
System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at
SL.XAML.ColleagueViewer.Proxies.GetUserProfileInfoCompletedEventArgs.get_Result()
at
SL.XAML.ColleagueViewer.Page.proxy_GetUserProfileInfoCompleted(Object
sender,
GetUserProfileInfoCompletedEventArgs
e) at
SL.XAML.ColleagueViewer.Proxies.SocialNetworkingClient.OnGetUserProfileInfoCompleted(Object
state) Line: 1 Char: 1 Code: 0 URI:
http://mytestsite/_layouts/1033/init.js?rev=ck%2BHdHQ8ABQHif7kr%2Bj7iQ%3D%3D
I have copied all of the necessary modification for silverlight to my web.config and run the install.bat file on my server.
Anyone have any thoughts. If more details are needed please comment and I will try to provide them.
Thanks,
Josh
First, be sure everything is in order in your silverlight install, there are more steps to the blue print than just modifying the web.config, specifically:
Install of WSS SP1 and/or MOSS SP1. Downloading and installing the silverlight SDK and copying appropriate files to your GAC. Installing .net 3.5 (system.web.extensions), adding the MIME type, etc.
Make sure you have done all of this, check out: http://www.u2u.info/Blogs/Patrick/Lists/Categories/Category.aspx?Name=Silverlight%20BluePrint
That said, I do not believe this is an install of Silverlight issue. (At least from the errors), check the install/reqs of the webpart again, there may be services it is dependent on that it does not have access to/are installed.

Resources