Broker Application distribution, registration, and security

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

Broker Application distribution, registration, and security
Installed Broker App continually crashes in background on test distribution machine. Works on Dev system. 
Robert Apostolico


Guest


Andrei,

I?Â?Ð?éve got a very basic test add-in working, using the Broker, on my DEV system (Windows 7 64-bit, IE 11). I used WiX 3.8 to create a setup project, and build a distribution to put it on a test system (before I invested more time, I wanted to make sure I could distribute the add-on).

Other than a try-catch, I made no changes to the Broker?Â?Ð?és startup program:
[MTAThread]
static void Main(string[] args)
{
try {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ADXIEBrokerModule.Initialize(typeof(IEBrokerModule), args);
}
catch (Exception ex) {
SigBOP.Utils.ErrorWriteToLog(ex);
}
}

In the IEBrokerModule itself, other than additional try-catches, there?Â?Ð?és nothing mystical that I?Â?Ð?ém doing:

public IEBrokerModule() {
try {
InitializeComponent();
}
catch (Exception ex) {
SigBOP.Utils.ErrorWriteToLog(ex);
}
}

private void IEBrokerModule_OnDataReceived(object sender, AddinExpress.IE.Broker.ADXIEBrokerDataReceivedEventArgs e)
{
// System.Diagnostics.Debug.Print(?Â?Ð?ìIEBrokerModule_OnDataReceived?Â?Ð?í);
try {

var request = e.RequestData as Hashtable;
var response = new Hashtable();

if ( request["operation"].ToString() == ?Â?Ð?ìwritevalue?Â?Ð?í ) {

var fs = System.IO.File.CreateText(?Â?Ð?ìc:\\test\\ie\\ietest.txt?Â?Ð?í);
fs.WriteLine(?Â?Ð?ìWrote to local storage!?Â?Ð?í);
fs.Flush();
fs.Close();

response.Add(?Â?Ð?ìresult?Â?Ð?í,?Â?Ð?íok?Â?Ð?í);
e.ResponseData = response;
}
}
catch (Exception ex) {
SigBOP.Utils.ErrorWriteToLog(ex);
}

}

private void IEBrokerModule_OnError(object sender, AddinExpress.IE.Broker.ADXIEBrokerErrorEventArgs e) {
// System.Diagnostics.Debug.Print(?Â?Ð?ìIEBrokerModule_OnError?Â?Ð?í);
}

private void IEBrokerModule_OnFinalize(object sender, EventArgs e) {
// System.Diagnostics.Debug.Print(?Â?Ð?ìIEBrokerModule_OnFinalize?Â?Ð?í);
}

private void IEBrokerModule_OnInitialize(object sender, AddinExpress.IE.Broker.ADXIEBrokerInitializeEventArgs e) {
// System.Diagnostics.Debug.Print(?Â?Ð?ìIEBrokerModule_OnInitialize?Â?Ð?í);
}

Here?Â?Ð?és the problem: Testing on an identical Windows 7, 64-bit machine with IE11 installed, I get the below errors:

ADD-IN/DLL gets an Error Pop-up in Internet Explorer that says:
?Â?Ð?èSigBOP?Â?Ð?é has fired an exception. Click the ?Â?Ð?èDetails?Â?Ð?é button to see the detailed information about the error.

When I click details, I get this >>

Detailed technical information follows:
?Â?Ð?ä
Date and Time: 4/11/2014 5:06:02 PM
Machine Name: SB-FRODO
IP Address: fe80::6139:86fe:90d:cd88%10
Current User: SIGBOP\bapostolico

Application Domain: C:\Program Files (x86)\SigBOP\
Assembly Codebase: file:///C:/Program Files (x86)/SigBOP/AddinExpress.IE.DLL
Assembly Full Name: AddinExpress.IE, Version=9.0.6121.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 9.0.6121.0

Exception Source:
Exception Type: AddinExpress.IE.ADXIEBrokerApplicationException
Exception Message: Unable to open broker pipe.
Exception Target Site: Object reference not set to an instance of an object.

?Â?Ð?ä- Stack Trace ?Â?Ð?ä-

***********************
Additionally, in the background, sbBroker app comes up with a Windows App Crash error:

Problem signature:
Problem Event Name: APPCRASH
Application Name: sbBroker.exe
Application Version: 1.0.0.0
Application Timestamp: 53483aec
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.18229
Fault Module Timestamp: 51fb1677
Exception Code: e0434352
Exception Offset: 000000000000940d
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: 2413
Additional Information 2: 2413de213f38e5efe700010a55469627
Additional Information 3: bac5
Additional Information 4: bac5ff64771af3c4a65ada835e80e994

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0?0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

NONE of my try-catches are ever hit, because IF they were, they would log the exception to disk. So something else is dying, but I?Â?Ð?ém not sure where to look.

I?Â?Ð?éve tried turning UAC completely OFF (and rebooted) on the TEST system, but it doesn?Â?Ð?ét help.

I?Â?Ð?éve Googled AddinExpress.IE.ADXIEBrokerApplicationException Unable to open broker pipe and can?Â?Ð?ét find any solution.

How do I go about resolving this issue?

PLEASE point me in the correct direction.

If I can show my supervisors that we can get this working and distributed, we will be purchasing Pro version.

Thank you.
Bob
Posted 14 Apr, 2014 08:53:26 Top
Andrei Smolin


Add-in Express team


Posts: 18791
Joined: 2006-05-11
Please make sure that the installer delivers the broker application onto the target machine.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Apr, 2014 09:14:15 Top
Robert Apostolico


Guest


Andrei,

Yes, the app is delivered, installed, and registered on the target machine.

Otherwise, I would not be getting an "App Crash" from an EXE that did not exist.

The EXEs config looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup >
<supportedRuntime version="v4.0"/>
</startup>
<appSettings>
<add key="BROKER_GUID" value="{B21955AA-0308-4D98-8882-D856A3723868}"/>
</appSettings>
</configuration>

In the registry, under Computer\HKLM\Software\Wow6432Node\Microsoft\Internet Explorer\Low Rights\ElevationPolicy\{B21955AA-0308-4D98-8882-D856A3723868}" contains:

AppName, REG_SZ, sbBroker.exe
AppPath, REG_SZ, c:\program files (x86)\sigbop\
Policy, REG_DWORD, 0x00000003 (3)

The same information exists under Computer\HKLM\Software\Microsoft\Internet Explorer\Low Rights\ElevationPolicy\{B21955AA-0308-4D98-8882-D856A3723868}

I also happened to notice this key under both 32-and-64 bit nodes for ElevationPolicy:

{A1E91264-A0FE-494F-A60D-9519B73714D4}
AppName, REG_SZ, adxloader.exe
AppPath, REG_SZ, C:\Program Files(x86)\SigBOP\
Policy, REG_DWORD, 0x00000003 (3)

So, it looks to me like everything installed and registered.
I just don't know where to look next in terms of troubleshooting a failure, since none of my try-catch exceptions are traced to disk.

Please advise.
Posted 14 Apr, 2014 10:05:28 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Robert,

Otherwise, I would not be getting an "App Crash" from an EXE that did not exist

The exception comes from the add-on, not an .exe.

Do you see the broker process in the Task Manager right after you get the error message? What is the target framework of your add-on and broker projects?
Posted 14 Apr, 2014 12:24:57 Top
Robert Apostolico


Guest


Sergey,

I found a solution/work-around, but I'm not 100% positive if its the correct solution and/or indicative of a bug with the automated build process.

On my DEV system (where the Broker App always worked), I looked in ADX IE Redistributables.
It did NOT show AddInExpress.IE.dll; nor did it show AddInExpress.IE.Broker.dll.
I then looked in the Product.wxs automatically generated for the WiX setup.
It included AddInExpress.IE.Dll, but did NOT include the AddInExpress.IE.Broker.dll.

I manually added the line to the config xml of the Product.wxs and recompiled the setup project.

That project distributed the AddInExpress.IE.Broker.dll onto the test/target machine AND properly works as tested on my DEV system.

Are we supposed to distribute the AddInExpress.IE.Broker.dll ?
If we are supposed to, not sure why they are not listed in "Redistributables".
Possible bug with the builder not automatically adding that reference.

I read through the documentation and it makes no mention of distributing this file.

The only way I picked up on it as a possible issue was I cleared my event-viewer logs, loaded SysInternals Process Monitor, and reviewed Application logs to see when the crash was occurring, and back-tracked through the sys internals Process Monitor log to see what the sbBroker.exe was trying to do at/around the crash.
Posted 14 Apr, 2014 14:48:57 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Robert,

Thank you for the bug report. This bug occurs in WiX setup projects only. We will fix it in the next build of the product.
Posted 15 Apr, 2014 04:31:00 Top