Jump to content

UniGUI ISAPI DLL and RealThinClient SDK HTTP Server


Sergey Grigoriev

Recommended Posts

Hi,
I am trying to develop web-server, based on RealThinClient SDKI have UniGUI evalution version 1.50.0.1481, downloaded from your site. 
Simple ISAPI modules, created in Delphi and IntraWeb ISAPI DLL works fine on my HttpServer, but I have a problem with UniGUI Application as ISAPI DLL.

The example: 

My unigui_web.dll module supposed to send some html, css, js, jpg and other files. But instead of each of these this files i get content of the start htmpl page (take a look at the file`s sizes):


17012019_123656.md.jpg


I have checked the handler of my ISAPI provider which is called for recieving files listed in start htmpl page. The code seems to be OK, and but the browser still shows only "Loading..." message.

My ISAPI Provider fills EXTENSION_CONTROL_BLOCK record like this:

    ecb^.dwVersion := HSE_VERSION_MAJOR shl 16 + HSE_VERSION_MINOR; // 131072
    ecb^.ConnID := THandle(Con);
    ecb^.dwHttpStatusCode := Con.Response.StatusCode; // 200
    ecb^.lpszMethod := @RtcStringToBytesZero(Con.Request.Method)[0]; // GET 
    ecb^.lpszQueryString := @RtcStringToBytesZero(Con.Request.Query.Text)[0]; // Empty
      
    PATH_INFO := Con.Request.Info.asString['PATH']; // '/uni-1.50.0.1481/css/uni-ext.css'
    ecb^.lpszPathInfo := @RtcStringToBytesZero(PATH_INFO)[0];
    //
    PATH_TRANSLATED := Con.Request.Info.asString['ROOT']; // PATH_TRANSLATED 'D:\Projects\HttpServer\Win32\Debug\www'
    ecb^.lpszPathTranslated := @RtcStringToBytesZero(PATH_TRANSLATED)[0];

    ecb^.lpbData := @RtcStringToBytesZero(Con.Read)[0]; // ''
    ecb^.cbAvailable := Con.Request.ContentIn; // 0
    ecb^.cbTotalBytes := Con.Request.ContentIn; // 0

    // Bind server function addresses
    ecb^.GetServerVariable := GetServerVariable; 
    ecb^.WriteClient := WriteClient;
    ecb^.ReadClient := ReadClient;
    ecb^.ServerSupportFunction := ServerSupport;

    // Call HttpExtensionProc 
    isapi.ExtProc(ecb^); 

The PATH_INFO variable every time gets an appropriate value, but inspite of this isapi.ExtProc function always return the same value (content of the start html page):

22012019_131208.md.jpg


Please tell me, what should i do to make UniGUI ISAPI DLL return correct files for my HttpServer?

Thanks in advance.
 

---------

Sergey Grigoriev

Link to comment
Share on other sites

Any Ideas?

How to transfer the UniGUI ISAPI DLL path to CSS, JS, ICO and other files requested from the HTML start document?

<!DOCTYPE html>
<html lang="ru">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>New Application</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=10.0, user-scalable=yes">
<meta http-equiv="content-type" content="charset=utf-8">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
<link REL="SHORTCUT ICON" HREF="/cache/unigui_web_dll/MXO9v3XLiA103366530/favicon.ico">

<---------------- List of necessary files ------------------------------------------------->
<link rel=stylesheet href="/uni-1.50.0.1481/css/uni-ext.css" />
<link rel=stylesheet href="/ext-6.6.0/build/classic/theme-classic/resources/theme-classic-all.css" />
<script src="/ext-6.6.0/build/ext-all.js"></script>
<script src="/ext-6.6.0/build/classic/theme-classic/theme-classic.js"></script>
<script src="/uni-1.50.0.1481/ext-unicommon-min.js"></script>
<script src="/uni-1.50.0.1481/ext-sync-min.js"></script>
<script src="/ext-6.6.0/build/classic/locale/locale-ru.js"></script>
<script src="/uni-1.50.0.1481/jQuery/jquery-1.11.2.min.js"></script>
<link rel=stylesheet href="/ext-6.6.0/build/packages/font-awesome/resources/font-awesome-all.css" />
<link rel=stylesheet href="/ext-6.6.0/build/packages/font-pictos/resources/font-pictos-all.css" />
<script src="/uni-1.50.0.1481/jQuery/MaskedInput/jquery.inputmask.min.js"></script>
<script src="/uni-1.50.0.1481/jQuery/autoNumeric/autoNumeric-1.9.35.js"></script>
<link rel=stylesheet href="/uni-1.50.0.1481/css/uni-xtheme-common.css" />
<link rel=stylesheet href="/uni-1.50.0.1481/css/uni-xtheme-classic.css" />
<script src="/uni-1.50.0.1481/ext-unigui-min.js"></script>
<style type="text/css">.x-viewport > .x-body {position:relative !important;}</style>
<style type="text/css">body {overflow-y: hidden !important;}</style>
<------------------------------------------------------------------------------------------------->
  
</head>
<script>
uniVars._extVer="6.6.0";_S_ID="_S_ID=MXO9v3XLiA103366530";uniSyncObj.errShow=true;uniSyncObj.errText="Connection Error";uniSyncObj.errRetryText="Retrying...";uniSyncObj.errTextColor="#0055AA";uniSyncObj.errAfterRetry=1;uniSyncObj.errLogTry=0x7ef4f2fa;uniSyncObj.licOwn="X21gaGdkaSltcDtiaFxkZyleamg=";uniSyncObj.srcArr="MzcwMTQzNDM5OA==";
Ext.application({name:"uniApplication",launch: function(){setTimeout(function(){Ext.get("loading").remove();Ext.get("loading-mask").fadeOut({remove:true});},250);Ext.BLANK_IMAGE_URL="/ext-6.6.0/build/classic/theme-classic/resources/images/tree/s.gif";
Ext.BLANK_IMAGE_SRC="<img src="+Ext.BLANK_IMAGE_URL+">";
TextMetrics=new Ext.util.TextMetrics(Ext.getBody());
var _ajxerr=false;_ifrm_("FRM_MXO9v3XLiA103366530");_showAjaxErr=true;_ajxflerr="Communication Error";Download=Ext.DomHelper.append(document.body,{tag:"iframe",cls:"x-hidden"});try{ O0=new Ext.window.Window({id:"O0_id",retfalse:{},onEsc:Ext.emptyFn,layout:"fit",title:"MainForm",closeToolText:"",maximizable:true,minimizable:true,resizable:true,icon:"/cache/project1_exe/MXO9v3XLiA103366530/favicon.ico",iconCls:"x-uni-icon-contain",uniFMask:{beforeclose:true},width:539,height:276});O0.nm="O0";_cdo_("MainForm");MainForm.ajxS=AjaxSuccess;MainForm.ajxF=AjaxFailure;O0.rootObj=true;MainForm.appRoot="/";_cdo_(null,O0,"window",MainForm); O8=new Ext.form.Panel({id:"O8_id",border:false,uActive:false,tabItems:new Ext.util.MixedCollection(),layout:"absolute"});O8.nm="O8";_cdo_(null,O8,"form",MainForm);O0.add(O8); O10= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O0&Evt=beforeclose&this="+P0.nm+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O0,e:"beforeclose"});});O10.nm="O10";O0.on("beforeclose",O10); O11= (function(P0){_saf_(P0);return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O0&Evt=activate&this="+P0.nm+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O0,e:"activate"});});O11.nm="O11";O0.on("activate",O11); O12= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O0&Evt=deactivate&this="+P0.nm+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O0,e:"deactivate"});});O12.nm="O12";O0.on("deactivate",O12);uniVars._mFrm_=O8;O0.on("deactivate",function(f){_sdf_(f)});ajaxRequest(O0,"cinfo",{ci:_gci_()});Ext.Msg.setAlwaysOnTop(10000000); O13=new Ext.container.Container({id:"O13_id",layout:"absolute",overflowX:"hidden",overflowY:"hidden",width:256,height:242,x:0,y:0});O13.nm="O13";_cdo_("uncntnrpnl1",O13,null,MainForm); O1B=new Ext.uni.Splitter({id:"O1B_id",bodyBorder:false,border:false,orientation:"e",minSize:30,width:6,height:242,x:256,y:0});O1B.nm="O1B";_cdo_("unspltr1",O1B,null,MainForm); O23=new Ext.panel.Panel({id:"O23_id",bodyBorder:false,html:"\x3Ctable border=\"0\" width=\"100%\" height=\"100%\"\x3E\x3Ctr\x3E\x3Ctd id=\"O23_id_td\" style=\"color:#000000;text-align:center\"\x3Eunpnl1\x3C/td\x3E\x3C/tr\x3E\x3C/table\x3E",header:false,layout:"absolute",width:265,height:242,x:262,y:0});O23.nm="O23";_cdo_("unpnl1",O23,null,MainForm);O8.add([O13,O1B,O23]);uniVars._loginFrm=null; O2B=new Ext.container.Viewport({id:"O2B_id",layout:"border",scrollable:true,style:"background:#004080;"});O2B.nm="O2B";_cdo_(null,O2B,"viewport",MainForm);uniVars._vport=O2B;Ext.util.Format.decimalSeparator=",";Ext.util.Format.thousandSeparator=" ";_cwk_();uniVars.gNavigate={e:true,t:true,c:true,gn:{s:0},gp:{s:0},gs:{s:0},gc:{s:0}};_dko_({BS:true,ESC:true}); O33= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O0&Evt=resize&this="+P0.nm+"&w="+P1+"&h="+P2+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O0,e:"resize"});});O33.nm="O33";O0.on("resize",O33); O34= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O0&Evt=move&this="+P0.nm+"&x="+P1+"&y="+P2+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O0,e:"move"});});O34.nm="O34";O0.on("move",O34); O35= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O0&Evt=maximize&this="+P0.nm+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O0,e:"maximize"});});O35.nm="O35";O0.on("maximize",O35); O36= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O0&Evt=minimize&this="+P0.nm+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O0,e:"minimize"});});O36.nm="O36";O0.on("minimize",O36); O37= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O0&Evt=restore&this="+P0.nm+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O0,e:"restore"});});O37.nm="O37";O0.on("restore",O37); O38= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O2B&Evt=resize&this="+P0.nm+"&w="+P1+"&h="+P2+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O2B,e:"resize"});});O38.nm="O38";O2B.on("resize",O38);showBrowserWarning("Your browser is not supported.\x3Cbr /\x3EYou may experience compatibility issues.");O0.show("");O0.retfalse.beforeclose=1;_axy_(O0);O0.uniMask={ldMask:false,maskWaitData:false,maskUseMsg:true};O0.uniMask.targetObj=null; O39= (function(P0,P1){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O1B&Evt=moved&this="+P0.nm+"&newSize="+P1+""+_gv_(O8),success:AjaxSuccess,failure:AjaxFailure,obj:O1B,e:"moved"});});O39.nm="O39";O1B.on("moved",O39);O1B.setElProp("cursor","col-resize",3,null,false,"");}catch(e){throw e;alert(e.message)}}});
window.onunload=function(){_cunld_()};
</script>
<body>
<div id="loading-mask"></div><div id="loading"><div class="loading-indicator">Loading...</div></div>
<div id=body></div><noscript>This web application requires JavaScript enabled</noscript></body>
</html>

Through the variable PATH_INFO from the record EXTENSION_CONTROL_BLOCK?

Through another data exchange mechanism between the server and the UniGUI ISAPI DLL module?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...