IE Extension not loaded when browser is invoked from URL link in a document

Add-in Express™ Support Service
That's what is more important than anything else

IE Extension not loaded when browser is invoked from URL link in a document
 
Boris Klyachko




Posts: 2
Joined: 2015-09-16
Hi there

I have developed IE browser extension (add-in) that subscribes to BeforeNavigate2 event and processes a url passed in event argument - e.Url;

The Add-in works fine however when the browser is invoked by clicking url link in an e-mail or word document BeforeNavigate2 event does not fire or the Add-in is not loaded. When the same url is typed into the navigation bar or even just a return key is hit while in the nav bar everything works.

What's the reason for this behaviour? Also how can I debug the Add-in? If IE is loaded I don't have any issue, but when IE is invoked from the word or the outlook I don't have a process to attach to for debugging before the url is clicked.

Please help!

IE8 32 bit
Win 7 OS
IE is the default browser
Word/Outlook are 32 bit processes
Posted 16 Sep, 2015 03:48:26 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Hello Boris,

I believe the add-on gets loaded but it doesn't intercept BeforeNavigate2 (this occurs because of the way Add-in Express works; in fact, this is the other side of preventing IE from marking your add-on as slow). You can check if this is so or not by turning Protected Mode off, starting IE in this way and checking if adxloader.log gets updated; the log file is typically located in Documents\Add-in Express\adxloader.log in the profile of the user who starts IE.

To bypass this issue you can use the fact that navigating to a page also triggers the NavigateComplete2 event. If you get it and you don't get BeforeNavigate2 first, then you catch the scenario you describe. In this case, you can navigate to the same page once again and get BeforeNavigate2 in this way.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Sep, 2015 06:06:08 Top
Boris Klyachko




Posts: 2
Joined: 2015-09-16
Thank you Andrei.

You were right - the add-on was loaded but BeforeNavigate2 was not fired on the first navigation request. I have intercepted NavigateComplete2 as per your suggestion and issued Navigate call to the original URL, closed the tab and unsubscribe from any further NavigateComplete2 messages:

NavigateComplete2 -= IEModule_NavigateComplete2;
TabClose();
Navigate(e.Url);

Also the logfiles helped a lot - I could correlate timestamps with ones from Fiddler. Thank you for pointing out the log location.

Regards
Boris.
Posted 17 Sep, 2015 01:02:48 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
Thank you for the report ))

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 17 Sep, 2015 03:02:23 Top