Page 1 of 1

BrowserScript dtnIsExpanded fails on DLL

PostPosted: 13 May 2014 14:05
by wieczy123
Hi,

the following C++ code works only in exe. By deploying as DLL it fails on expanding a item:

cpp code
// Fill Tree

for(int i=0;i<10;i++) {
TIWCGJQDynaTreeNode *newitem = IWCGJQDynaTree1->Nodes->Add();
newitem->Title = "Main";

TIWCGBrowserParam *parm1 = IWCGJQDynaTree1->JQDynaTreeOptions->OnExpand->BrowserParams->Add();
parm1->ServerName = "ex_" + newitem->UniqueName;
parm1->BrowserScript = newitem->jsNodeCommand(dtnIsExpanded);

for(int j=0;j<10;j++) {
TIWCGJQDynaTreeNode *subitem = newitem->Children->Add();
subitem->Title = "Child";

TIWCGBrowserParam *parm2 = IWCGJQDynaTree1->JQDynaTreeOptions->OnExpand->BrowserParams->Add();
parm2->ServerName = "ex_" + subitem->UniqueName;
parm2->BrowserScript = subitem->jsNodeCommand(dtnIsExpanded);

for(int k=0;k<10;k++) {
TIWCGJQDynaTreeNode *subsubitem = subitem->Children->Add();
subsubitem->Title = "SubChild";
}
}
}

Here you can check this out:

http://www.cmportal01.de/cgi-bin/Tree.dll

What can I do?

best regards

Frank

Re: BrowserScript dtnIsExpanded fails on DLL

PostPosted: 13 May 2014 14:44
by Jorge Sousa
Hi Frank

Putting the browser in debug, in can see this in browser console

POST http://www.cmportal01.de/cgi-bin/Tree.d ... GJQDYNATRE…ATREE1_9_7=false&ex_IWCGJQDYNATREE1_9_8=false&ex_IWCGJQDYNATREE1_9_9=false 404 (Not Found)

But it's a strange behaviour for a 404 error, please can you post any code related to tree links?

I take the opportunity to adivse, also for future reading, how to debug an ISAPI dll, you should be able to debug the same way in C++

In delphi is run

- make sure delphi runs as admin
- start the web app / site
- In IDE menu, Run + Attach to Process, and select w3wp.exe
- a cpu window appears, hit F9, and you should be able to see some breakpoints.

i hope it helps

Re: BrowserScript dtnIsExpanded fails on DLL

PostPosted: 13 May 2014 15:16
by wieczy123
Hi,

there is no other code in this little project. It's specially developed to show you this behavoir.

BTW: if the indexes only run to 5 instead of 10 it will also run as DLL.

What can I do?

best regards

Frank

Re: BrowserScript dtnIsExpanded fails on DLL

PostPosted: 13 May 2014 15:36
by Jorge Sousa
Hello

there is no other code in this little project. It's specially developed to show you this behavoir.


Send us the little project please. t.i.a.

Re: BrowserScript dtnIsExpanded fails on DLL

PostPosted: 13 May 2014 17:24
by wieczy123
you have email at Support at cgdevtools dot com

Re: BrowserScript dtnIsExpanded fails on DLL

PostPosted: 14 May 2014 11:13
by Alexander Bulei
Hi Frank,

First, you don't need add the browser parameter for each node, it will increase the request url to Expand event.
Remove this part.

You must use the browser parameter (dtnIsExpanded), when you need it, e.g: onclick of button.


Also, you need configure IIS:

  • Increase query size limit:

    Code: Select all
    configuration/system.webServer/security/requestFiltering/requestLimits@maxQueryString to 32768

  • Increase upload limit:

    Code: Select all
    appcmd.exe set config "SiteName" /section:system.webServer/serverRuntime /uploadReadAheadSize:"1048576" /commit:apphost

Thanks.

Best Regards.

Re: BrowserScript dtnIsExpanded fails on DLL

PostPosted: 15 May 2014 09:21
by wieczy123
Thank you - it runs :-)