Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a test html file below. When I run it in IE (v11) it runs as expected.

However when I navigate to the file with a WebBrowser control in c# on a form in a blank new project, only the map and markers is displayed (VS2015).

It was working prior to the Infrastructure upgrading IE to 11 and as WebBrowser uses the local IE the version. webBrowser1.Version.ToString returns 11.0.9600.18283.

So my suspicions are round the security of IE11.

So my question is: I there any on WebBrowser control around security (I cant find anything) I can try or anything in the html I could try to get the webbrowser control to work correctly.

HTML
<!-- saved from url=(0011)about:blank -->
<!DOCTYPE html>
    <head> 
       <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 
       <title>Google Maps API v3 Directions Example</title> 
       <script type="text/javascript" 
               src="http://maps.google.com/maps/api/js?sensor=false"></script>
    </head> 
    <body style="font-family: Arial; font-size: 12px;"> 
       <div style="width: 600px;">
         <div id="map" style="width: 280px; height: 400px; float: left;"></div> 
         <div id="panel" style="width: 300px; float: right;"></div> 
       </div>
       
       <script type="text/javascript"> 
    
         var directionsService = new google.maps.DirectionsService();
         var directionsDisplay = new google.maps.DirectionsRenderer();
    
         var map = new google.maps.Map(document.getElementById('map'), {
           zoom:7,
           mapTypeId: google.maps.MapTypeId.ROADMAP
         });
        
         directionsDisplay.setMap(map);
         directionsDisplay.setPanel(document.getElementById('panel'));
    
         var request = {
           origin: 'Chicago', 
           destination: 'New York',
           travelMode: google.maps.DirectionsTravelMode.DRIVING
         };
    
         directionsService.route(request, function(response, status) {
           if (status == google.maps.DirectionsStatus.OK) {
             directionsDisplay.setDirections(response);
           }
         });
       </script> 


What I have tried:

I have try several versions of the

HTML
<!-- saved from url=(0011)about:blank -->

and although it stop the prompting it IE it does not change anything in the webbrowser.
Posted
Updated 8-Jun-16 14:50pm

1 solution

Quote:
It was working prior to the Infrastructure upgrading IE to 11 and as WebBrowser uses the local IE the version


That's not entirely true. Yes, it's using IE. NO, it's not using the IE11 rendering engine. It's using, by default, the IE7 rendering engine.

Read this[^] for a good explanation of what's going on and how to "fix" it.
 
Share this answer
 
Comments
RossMW 8-Jun-16 20:54pm    
Yes, read a similar article. Unfortunately been down that road and tried every version available to no avail. I'm nearing the throwing my arm in the air and giving up....
Dave Kreskowiak 8-Jun-16 21:36pm    
If you're running your app from the debugger and still running into problems, did you try adding the vshost version of your executable to the list?

For example: MyApplication.vshost.exe
RossMW 8-Jun-16 22:01pm    
I tested it via the compiled exe. Normally the development is saved on a server so I even copied the exe locally to my pc before testing.
RossMW 8-Jun-16 23:56pm    
Hi Dave

Reread the article and noticed the section on Wow6432Node part of the registry. Set it to 10000 and it works a treat. You're a hero Thanks Ross

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900