Home - Forums-.NET - FlyTreeView (ASP.NET) - FlyTree and Reverse Proxies

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

FlyTree and Reverse Proxies
Link Posted: 20-Jul-2009 09:24
We have a client that is currently using our site with the FlyTree control. Some of the users for our client are forced to go through a reverse proxy (IBM/Tivoli WebSEAL) while the other users have no reverse proxy to go through and are without problems.  

For the users who go through WebSEAL, they're having trouble using the FlyTree control. When the page loads, everything is displayed correctly and there doesn't appear to have any problems. Upon clicking a node within the FlyTree control, the "loading..." dialog can be seen, but nothing else renders.

On the surface of things, it appears that the AJAX call isn't getting the data requested, but when the users navigate away from the page and return back, they're able to select the node and data appears without the "loading.." appearing. When they try to select another child-node, the same "loading..." message appears without resolution.

At this point, it appears (to us) that the reverse proxy plays some part in this issue (if not its the source of the problem). Has anyone run into these types of issues with WebSEAL or any reverse-proxies? What steps did you take in resolving any issues that occurred? Is there anything that can be done in terms of ASP.NET/Javascript on our end? How can we troubleshoot this issue?
Link Posted: 20-Jul-2009 21:30
With any of browser debuggers like Firebug (for Firefox) you can view what HTTP request goes wrong (there are response codes for all requests in Firebug).

Load-on-demand produces page callback.
You can also check whether callbacks are ok with your reverse proxy (by just making simple test page that accepts callbacks).
Link Posted: 21-Jul-2009 03:28
Thanks for the ideas. I've looked into firebug and stepped through the javascript (on our network - I know it's a bit pointless) using firebug but we haven't been able to access our client's network and test things out as well. Currently, we're trying to gain access to the client network but that's a whole other issue in and of itself.

If the callbacks aren't working, is there another mechanism to circumvent the callback? Could we load all the data to build the nodes at the OnLoad event so no calls need to be made in the first place? I realize that I'm essentially cutting out the 'asyncronicity' out of AJAX, but as long as it works for our client without any issues that's fine be me!
Link Posted: 23-Jul-2009 04:56
Actually, if callbacks do not work, it means a reverse proxy issue, not asp.net one.
FlyTreeView's load-on-demand strongly depends on callbacks. Of course you can download nodes data the way you want (using any other async HTTP request) and construct nodes using javascript. But this way does not seem to be of anything simple.
I would rather try to determine and fix proxy issue.
...or it may be not a callback-related issue. First we should reproduce the problem, only then we may have any ideas on how to fix/workaround it.
Link Posted: 23-Jul-2009 05:00
Thanks for your response. We're currently working with our client to gain remote access to test the issue directly through the reverse proxy. Is this reverse proxy issue common with AJAX in general or do you have documentation pointing out these possible issues?

Thanks again for your information. I'll keep this thread updated with any new developments.
Link Posted: 23-Jul-2009 05:46
Not sure about known ajax+reverse proxy issues.
At least, we haven't complains regarding reverse proxy.
Link Posted: 23-Jul-2009 05:58
IBM/Tivoli is aware of the issue, but give very little in terms of documentation. All I've been able to find is this: http://www.ibm.com/developerworks/tivoli/library/t-ajaxtam/index.html but I'm not sure how much of the proposed solutions I can test/implement.
Link Posted: 06-Aug-2009 08:50
We think we've narrowed down the problem to junction cookies. Our client claims that switching content type from text/html to text/plain will resolve the issue. This resolution can be found in the IBM article found here: http://www.ibm.com/developerworks/tivoli/library/t-ajaxtam/index.html#junction_cookies.

If the response from an AJAX request is not to be rendered as HTML, the response should not be sent with a content type of "text/html". A more appropriate content type should be used, for example, "text/plain". WebSEAL does not add the junction cookie code to responses that do not have a content type of 'text/html'


Can we alter the content type being transmitted within the FlyTree control? I've been looking through the class reference but have yet to find a property or method.

Thanks!
Link Posted: 06-Aug-2009 11:27
FlyTreeView does not send content-type.
You can try to alter it yourself when Page.IsCallback is true.
Link Posted: 18-Aug-2009 11:19
So far, it appears the junction cookie issue was the culprit according to the IBM/WebSEAL AJAX documentation. By adding the following code to our ASP.NET page, the flytree control is working as expected.

protected void Page_Load(object sender, EventArgs e)
{

     if (Page.IsCallback)
     {
        Response.Clear();
        Response.ContentType = "text/plain";
     }
     else
     {
        Response.Clear();
        Response.ContentType = "text/html";
     }

}