vb.net Webbrowser Control not displaying Javascript - vb.net

I have tried this on numerous pc's and are receiving the same error. My webbrowser control isnt displaying javascript or jquery.
Here is a example:
when i visit this url in my browser: https://binarykings.co.uk/traderoom-aspx, it looks great with the charts and prices etc.
example: http://i.imgur.com/1Lmq4em.png
same in internet explorer: http://i.imgur.com/3KP864X.png
however in my vb.net webbrowser control it looks like this: http://i.imgur.com/qjme2Yg.jpg
What is causing this ? Its not just this site but any other site that has a similar way of displaying things via jquery/javascript.
I do have script errors suppressed however when i disabled this and clicked yes to the errors manually it still displayed the same empty page.
Thanks

The WebBrowser control uses the Internet Explorer rendering engine. But by default, for compatibility reasons, it is stuck using the IE 7 rendering engine, even if you have a later version of the browser installed on your computer.
There are a couple of ways to convince it to use a newer version of IE to render the page. One involves editing the registry, while the other involves modifying the web page.
In general, it is best to avoid attempts to solve local problems with global solutions like registry edits. There might be another app running on the same machine that uses the WebBrowser control and relies on the behavior of the IE 7 rendering engine. If you go changing global settings, you'll mess up that other app.
Therefore, the best solution, if possible, is to edit the web page. This is quite simple, and probably a good idea anyway. All you need to do is add the following code inside of the <head> section:
<meta http-equiv="X-UA-Compatible" content="IE=9" >
If you absolutely must use the alternative approach of editing the registry, you'll find the information you need here in the documentation.

Related

How can I determine the Reason IE is going into Compatibility View Mode and prevent it from happening?

Okay, here are the facts regarding our problem:
The web site we are working on is designed to use modern HTML5 features. This includes indexedDb.
We are using the following HTML right at the top of each page:
<!DOCTYPE html><html><head><meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
All our users are using the same version of IE11.
We have 200+ active users who use the site, and for most of them, everything works just fine. The browser stays in "Edge" mode.
So far though, 3 of those users' browsers started opening the pages on the site in Compatibility View Mode instead of the default Edge mode. It was working for them fine previously.
If any other user goes to any page that those 3 users went to, they open fine (in Edge mode).
I created a super-simple diagnostic page devoid of CSS, HTML5 features, etc., when the users who are having the problems go to this page, it STILL going into compatibility view mode! It seems once the damage has been done, the browser wants to go into compatibility view mode for that domain regardless of the page content!
We've tried deleting Browsing History in the user's browser including cookies and website data... it does not fix the problem.
Restarting the PC does not work.
We do not have enough security to access any registry settings or directories where the browser stores its files.
So for starters, the question is, what steps can we take to figure out WHY their browsers when into compatibility mode in the first place. The only things I'm finding are vague error messages in the F12 console about using some feature or other improperly. No info about what feature or what error it caused.
And then, if that can be resolved, for users already in this mess, is there any viable steps we can take to get them so they see the site in Edge mode once again.
I'll be grateful for any help I can get on this. I am really stumped on this one!

IE 11 - Is there a way to check then enable / disable enterprise mode?

I am out of wit as how to solve this problem in Javascript or HTML. I have customers currently using web applications built for ie9 and under. These legacy applications do not work well on IE11. IT solutions was to enable enterprises mode. Enterprises mode was designed to avoid "common compatibility problems associated with web apps written and tested on older versions of Internet Explorer".
See: http://www.eightforums.com/tutorials/43972-ie11-enterprise-mode-enable-disable-users.html
Enabling enterprises mode appear to be problematic on web application written using Bootstrap and AngularJS. Ie, responsive does not work at all unless enterprises mode is disabled. Not just AngularJS and Bootstrap but other libraries as well.
The solution that I am looking for is a way to check the status of enterprises mode via javascript, then tell the users to either enable / disable the mode. Better, if it can be turn off / on automatically via JS or HTML attributes.
Snooping in the document.x and window.x objects, I do not see any properties that we would give me an indication that enterprises mode is enable. Any suggestion?
Repro(s):
IE11 > Developer Tool > Console > Type window
IE11 > Developer Tool > Console > Type document
There is no DOM property that indicates that you're running EMIE. The whole idea of EMIE is to emulate IE8 behavior better than the IE8 document mode emulates IE8 behavior. EMIE should only be used in specific cases where it's needed; it should not be used wholesale.
It is possible to detect EMIE in certain cases. If you look carefully at the list of user-agent strings over the last couple of releases, there's a noticeable difference between EMIE on IE11 and the user agent string for IE11 RTM.
However, before you take that as your magic bullet, there are two caveats:
You cannot disable EMIE programmatically. It's a local configuration change only.
The user agent for IE11 is completely different today than it was when IE11 was released. Based on reports from the IE team, the UA string is going to be even more complicated, especially once "IE Spartan" (or whatever they choose to call it") hits the wire.
My recommendation? Create a small launcher page that does a simple feature detection for the web app in question. If you detect features consistent with what's needed for the app, then display a link to launch the app. If feature detection fails to detect IE8, IE11, or whatever version you've targeted, display a warning with a link to more troubleshooting information. Be sure to include a launch link anyway, just in case.
This way, the user has the information they need and you have a lightweight way of handling the issue, one that doesn't require too many updates to the app in question.
Hope this helps...
-- Lance
To my mind the reason of the issue is that IE 11 Enterprise mode emulates IE 8. But bootstrap doesn't support IE 8. To overcome it just use HTML5 shim and Respond.js as described here.
<script src="js/respond.min.js"></script>
<script src="js/html5shiv.min.js"></script>
But without check like <!--[if lt IE 9]> - because it seems that it doesn't work in the enterprise mode.
The better solution would be not just include the mentioned scripts without conditions but find out the appropriate condition instead of < IE 9.
To fix the problem with angularjs just use the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
For those who also struggled with this problem. I have submitted a feature request to MS IE Team.
See:
https://connect.microsoft.com/IE/feedback/details/1159543/need-a-way-for-client-side-codes-to-detect-enterprises-mode
My solution is a workaround that involve checking the width of the container div. Enterprises mode do not support responsive.

Can I change the rendering engine of the WebBrowser control to an older version?

i have an application with a webbrowsercontrol. this webbrowsercontrol is going to load a page that is not compatible with IE9. (cannot change this because its produced by somebody else) By default VB.NET 2010's webbrowser control uses IE9 renderengine, and can run in some sort of compatibility mode. unfortunately even in compatibility mode the page do not work. is there are way to use a webbrowser control with a genuine IE7 or IE8 render engine? thanks
UPDATE
explaining the problem: i have a page with a JAVA applet inside. this java applet has a popup opening with a textbox. this textbox is forced to stay in front until closed. this works fine in IE7 and IE8. in IE9 however if i move the browser window or access any other application this messagebox jumps to the back. and cant be clicked anymore. my webbrowser (IE9 running any emulation) does not work. it beheaves as if it still would be on IE9 even if i emulate IE7 or IE8.
is there are way to use a webbrowser control with a genuine IE7 or IE8 render engine?
Yes, but it requires that you downgrade the version of Internet Explorer that is installed on the computer to version 7 or 8, which doesn't make for a friendly installation experience.
The issue is that the WebBrowser control always uses the version of IE that is installed on the computer because it simply delegates rendering to the native library shdocvw.dll, the same one that is used by IE itself. In your case, that appears to be IE 9. However, by default, it also runs in IE 7 compatibility mode. You can change this by editing the registry, but you cannot change the version of the rendering engine.
And unfortunately, this means you're out of luck, because running multiple versions of IE on a single computer is not and has never been a supported configuration. It can be accomplished for testing purposes, but it requires additional software and the versions don't play nicely together. Certainly not nicely enough for one to support the standalone IE browser while the other drives the .NET WebBrowser control.
Fixing the code to work properly with IE 9 is the best option. IE 9 represents Microsoft's slow progression towards a standards-compliant browser, and although it still has some quirks, it is worth supporting. I know you said that the website code is maintained by "someone else", but I recommend filing a support request with them—their code is buggy and needs to be fixed. If you (or they) need help with this, they can ask some of our code ninjas web standards experts here on Stack Overflow.
Alternatively, you could explore replacing the WebBrowser control with an alternative control. There are several good ones for the .NET Framework, wrapping the rendering engines used by other popular browsers. For example:
WebKit .NET is a wrapper for the WebKit engine, used by Google Chrome and Apple Safari.
GeckoFX is a wrapper for the Gecko rendering engine, used by Mozilla Firefox.
MozNet is an alternative wrapper for Gecko.
Unfortunately, if the code you're dealing with is so badly written that IE 9's feeble attempt at standards-compliance brings it to its knees, it's unlikely that switching to the rendering engine for another even more standards-compliant browser will bring much success.

sharepoint 2010, customized sp ribbon javascript file is not loading properly in chrome....any inputs????

We have customized ribbon(js scripts) that loads properly in IE and firefox but in google chrome(which is a requirement to use it due to its high response time) it does not load the ribbon at the first instance. However, it loads after several page load refreshes(Ctrl + F5). If anyone come across this issue, provide your inputs. Appreciate your help. Thanks
SharePoint and IIS are always trying to cache resource, to ensure application performace. When you're doing SharePoint Development you've always to ensure that cache is cleared.
Especially when you're working with the SharePoint ribbon it's required to clear the cache before accessing the website after deployment.
When you're using CKS tools for deployment from VS2010 you have to ensure that files are copied to the SharePoint Root. Sometimes I get an exception when they try to overwrite JS files in the SharePoint root, because sharepoint has a handle on them.
When doing SharePoint development I always copy *.resx and *.js by hand.
The issue appears to be with the rendering of the search box control in Google Chrome. Try adding 'Visible="false"' to the 'SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4"' control on the master page. This corrects the rendering issue for us.
SharePoint is officially not built to work in Google Chrome
I just fixed my webkit (chrome and safari) browser issues such as scrolling and the ribbon loading with this nice script http://goo.gl/1OUlI. Ended up being a timing issue. Hope it helps you out. I see this is a bit old but no best answer.

ASP.net Ajax Partial Rendering using UpdatePanel not working in WebKit browsers

I am part of the developer team for a quite a large online system using ASP.NET(4).
Asp.net Ajax completely breaks down for Webkit browsers and we are getting full page postbacks when we should be getting partial only for the UpdatePanels.
I am starting to believe it has something to do with my Application Configuration, mainly for the following reasons.
If I move the ajax enabled controls to a new project they will work as expected for all browsers, including Webkit.
I created a static .aspx file with nothing but an UpdatePanel,ScriptManager and a button making a literal visible on click.
I get no Javascript errors from any browser, and i see an http request for the asp.net-ajax (ScriptResource.axd) in both Firebug and Chrome Developer tools
I tried ye'old safari fix from this highly referenced thread
Edit: After a bit more testing and http sniffing i noticed a major difference between the test application and the actual application. The test application generates 2 additional .axd files which are not generated from the actual application. These WebResource.axd, seem to contain data related to the async postback. However this is only the case for Webkit browsers. The WebResource.axd files are generated for Firefox as i can see them in firebug
What i am asking from the community, is any ideas or suggestions as to what could be the cause of this problem and if i am correct to assume that the problem is probably on the server side
Thanks for any help
The problem was due to a deprecated config file that's used to limit the content that bots/spiders/crawlers receive, which was loading by mistake thanks to our lovely inhouse CMS
In short if u get behavior similar to my case, check your or configs
I was having a similar issue however my problem was with all browsers and not just webkit. I ended up going through and tearing up the web.config file and found out that a line: <xhtmlConformance mode="Legacy"> was preventing webresource.axd from working properly. The fix was to simply remove that line from my web.config file.
For a little more information on xhtmlConformance, visit http://technet.microsoft.com/en-us/librarY/ms228268(v=vs.85).aspx.
If you scroll all the way to the bottom you'll notice it explicitly states that it causes issues with webresource.axd and scriptresource.axd.