Acceleration of AJAX application fails through Access Gateway because of redirects

  • 7012511
  • 30-May-2013
  • 30-May-2013

Environment

NetIQ Access Manager 3.2
NetIQ Access Manager 3.2 Support Pack 1 applied
NetIQ Access Manager 3.2 Access Gateway
Custom AJAX application front ended by Access Gateway

Situation

A target Ajax based custom web application has a login form that users are manually logging into (no FormFill configured yet). 

After logging in to NAM and then entering credentials into the web application's login form, an error was returned by the application and users could not login successfully. The error indicated that

"the message received by the server could not be parsed. Common cause for this error are when the response is modified by calls to response.write(), response filters, HTTPmodules or server trace is enabled.
Details: Error parsing near 'pages/videocheck.aspx|'"


Both ieHttpHeaders and HttpFox show that the payload response (text/plain) to the POSTed credentials is

                              43|pageRedirect||http://vod.learn.net/pages/videocheck.aspx|

This appeared to be a redirect to a URL, but it specified the internal name of the Web server, and not the published DNS name accessed via the Access Gateway.

To try and workaround the issue, the Administrator created a rewrite policy (including adding text/plain to the policy) to rewrite http://vod.learn.net/pages/videocheck.aspx to http://vod.schools.net/pages/videocheck.aspx.

The above changes did not make any difference to the final outcome, where users could still not login successfully.

Resolution

Make sure that you change both the hostname of the internal web server in the rewriter configuration above, as well as the length field within the redirect string returning the internal hostname eg. configure the rewriter to rewrite

43|pageRedirect||http://vod.learn.net/pages/videocheck.aspx

to

45|pageRedirect||http://vod.schools.net/pages/videocheck.aspx.