Custom DataDrivenAdapter not calling it's base OperationHandler

Aug 16, 2012 at 6:39 PM

This is very weird but I'm really have tried everything before asking here.

For my hosted application I have a custom DDA. Then when trying to use it I got a StackOverflowException because the overrided OperationHandler calls itself instead of the base method.

To discard any mistake on my part I took the project from the QuickStarts, QsDataDrivenAdapterExt, just changing the namespace and got the same result.

The code from the quickstart simple overrides the operationhandler, checks if the control name starts with "newtag" and if not it calls base.OperationHandler but in my case during runtime it ends up calling itself causing the stack overflow.

What's going on? Thanks.

Aug 16, 2012 at 11:24 PM

Indeed, weird.

I have written a few DDA’s of late and have not seen this issue, could you post your code somewhere I could see it?


Aug 17, 2012 at 2:02 AM

Hello Matt,

At this point I'm just using the code from the quickstart and still no luck,:

    public class WinDDAEx: WinDataDrivenAdapter
        public WinDDAEx(XmlDocument appInitString, object appObject)

            : base(appInitString, appObject)

        protected override void Dispose(bool disposing)
            if (disposing)

        protected override string OperationHandler(OperationType op, string controlName, string controlValue,string data)
            return base.OperationHandler(op, controlName, controlValue);

I change the Type in the DataDrivenAdapterBindings section of the configuration and then run an automation that get the values of a few controls and that's when the stack overflow happens, the GetControlValue operation keeps coming to the same overriden method.

Another issue/question: for other external hosted application I'm using a custom adapter starting with the project produced by the VS 2010 template, however when I change the hosted application configuration from Use HAT to my new custom adapter the activities that I created before and linked to UII Actions stop working. If I change it back to use HAT they work fine. Anything I can do here to get both?, custom AppAdapter and HAT activities?


Aug 27, 2012 at 3:12 PM

Ok, I figured it out. If some else is having the same problem it's because the code from the quickstart has a little bug. It calls base.OperationHandler(string,string,string) which when decompiled only shows that it calls this.OperationHandler(string,string,string, string.Empty), that's where the stackoverflow comes from.

Solution?, instead of calling base.OperationHandler(op, controlName, controlValue) call base.OperationHandler(op, controlName, controlValue, data).