Hello Infragistics,
Has anyone complained before about Infragistics controls with Sonic Wall?
If you dont know, Sonic Wall is a firewall on which people can log on like Baracuda.
The guys over at Telerik already found out that Sonic Wall injects pieces of script in their script, see this thread: http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/issues-with-components-over-sonicwall-vpn.aspx
Have you guys heard about problems like this? Do you perhaps have contact with Sonic Wall organisation maybe? Perhaps have a workaround for me?
Thank you very much in advance. It's a big problem for us!
Hi,
When you mention that it's a big problem, do you mean that you've tried using our controls over this VPN solution, and there are specific issues that you've experienced? I don't think there should be any errors with it, because we do most of the logic on the client, after the page has loaded. We don't send any mix of markup + JavaScript from the server, apart from the common initialization snippets (placeholder + some javacsript to initialize the widget). We don't do "BLOCKED SCRIPT <something>" anywhere in our code. I mean, if Sonic wall modifies our actual scripts (the infragistics.*.js files), there is little we can do about it. Let me know what is the particular issue you are facing.
Thanks,
Angel
Hello,
Yes, we use Infragistic's JQuery Hierarchical Grid over this VPN solution called Sonic Wall and we are experiencing the issue that the grid suddenly doesn't load at all.
We started searching online and found that thread over at Telerik which I copied in my orriginal post. Apparantly Sonic Wall inserts scripts to eliminate possible threats.
So we started comparing the sourcecode on the client (by right clicking on the page and choosing source) and we discovered that SW tempered with our own scripts. This is how our script normally looks:
function popUpTemplate(template) { //debugger; //Get div to make PopUp in. var newdiv = document.getElementById('dialog'); //Clear div $("#dialog").children().remove(); //Parse XML if (window.DOMParser) { parser = new DOMParser(); xmlDoc = parser.parseFromString(template, "text/xml"); } else // Internet Explorer { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.loadXML(template); } //Set title div var templateName = xmlDoc.getElementsByTagName('Template')[0].getAttribute('name'); var patientName = xmlDoc.getElementsByTagName('Template')[0].getAttribute('patientname'); if (templateName == null) { templateName = ''; } //Loop trough fields and create controls var fields = xmlDoc.getElementsByTagName("Field"); var tab = document.createElement('table') newdiv.appendChild(tab); for (i = 0; i < fields.length; i++) { var row = document.createElement('tr'); var labelCell = document.createElement('td'); //element.setAttribute('type', 'Label'); if (fields[i].getElementsByTagName('Label')[0].childNodes.length > 0) { labelCell.innerHTML = fields[i].getElementsByTagName('Label')[0].childNodes[0].nodeValue; } var contentCell = document.createElement('td'); if (fields[i].getElementsByTagName('Content')[0].childNodes.length > 0) { contentCell.innerHTML = fields[i].getElementsByTagName('Content')[0].childNodes[0].nodeValue; } row.appendChild(labelCell); row.appendChild(contentCell); tab.appendChild(row) } //Show dialog $("#dialog").dialog({ state: "opened", title: "Template: " + templateName + ", van patient: " + patientName, height: 600, width: 800, modal: true, buttons: { Ok: function () { $(this).dialog("close"); } } }); }
This is the same function over SonicWall:
function popUpTemplate(template) { //debugger; //Get div to make PopUp in. var newdiv = document.getElementById('dialog'); //Clear div $("#dialog").children().remove(); //Parse XML if (window.DOMParser) { parser = new DOMParser(); xmlDoc = parser.parseFromString(template, "text/xml"); } else // Internet Explorer { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.loadXML(template); } //Set title div var templateName = xmlDoc.getElementsByTagName('Template')[0].getAttribute('name'); var patientName = xmlDoc.getElementsByTagName('Template')[0].getAttribute('patientname'); if (templateName == null) { templateName = ''; } //Loop trough fields and create controls var fields = xmlDoc.getElementsByTagName("Field"); var tab = document.createElement('table') newdiv.appendChild(sw_httprp_elementInsert(tab)); for (i = 0; i < fields.length; i++) { var row = document.createElement('tr'); var labelCell = document.createElement('td'); //element.setAttribute('type', 'Label'); if (fields[i].getElementsByTagName('Label')[0].childNodes.length > 0) { labelCell.innerHTML = sw_httprp_rewrite_innerOrOuterHTML(fields[i].getElementsByTagName('Label')[0].childNodes[0].nodeValue); } var contentCell = document.createElement('td'); if (fields[i].getElementsByTagName('Content')[0].childNodes.length > 0) { contentCell.innerHTML = sw_httprp_rewrite_innerOrOuterHTML(fields[i].getElementsByTagName('Content')[0].childNodes[0].nodeValue); } row.appendChild(sw_httprp_elementInsert(labelCell)); row.appendChild(sw_httprp_elementInsert(contentCell)); tab.appendChild(sw_httprp_elementInsert(row)) } //Show dialog $("#dialog").dialog({ state: "opened", title: "Template: " + templateName + ", van patient: " + patientName, height: 600, width: 800, modal: true, buttons: { Ok: function () { $(this).dialog("close"); } } }); }
Notice the "sw_httprp_rewrite_innerOrOuterHTML" and the "sw_httprp_elementInsert". These are SonicWall functions (I looked it up). Now because the entire Infragistics Grid doesn't get loaded at all (visually that is because the code for the grid is in the source) I thought I'd ask you guys if you have any experience with this. Do you for instance know how I can check the infragistics.*.js files after loading the site via SonicWall?
thanks for the feedback. None of this modified code is part of the Infragistics toolset and we don't set innerHTML anywhere (we use the jQuery API to manipulate the DOM). I strongly suggest to contact the SonicWall guys and explain the scenario to them. Maybe they already have solution for this - i am sure the same results can be reproduced with a simple doc where you set innerHTML as a result of an AJAX call.
in order to check if the IG scripts were modified, load the page and using firebug or chrome dev tools, locate the loaded script on the Script tab. For instance if you're using firebug , hit F12 => Script => select the IG resources from the dropdown and search for "sw_httprp".
No, like I said, the modified code is 'our script'. I wasn't that familair with Firebug yet.
Very strange, I did as you told me to check IG scripts in Firebug and it's not in the dropdown. All my other scripts are in the dropdown, except all IG scripts. So I can't choose to view it. Do you know how that is possible?
You can close this thread if you want.
The only difference I could find between the other js scripts and Infragistic's js scripts is that they where 1 subdirectory down in their own IG folder. So I copied them up and changed my references and suddenly there was no problem.
Ofcourse we can't tell for sure why SonicWall has a problem with scripts being in subdirectories of the Script folder. We'll have to find that out. First I'll need to get my Datepicker to work. Next item which is suddenly broken when you use SW. *sigh*