[mapguide-internals] Problem with Authorization/Authentication of mapguide clients (not browser) in mapagent CGI [SOLVED] HOW TO DEBUG the WebTier

UV uvwild at gmail.com
Tue Dec 9 22:09:25 EST 2008

As often simple solutions for initially hard problems ;-)

This should go into a mapguide developer wiki which I have not found yet.
The /Best Practices Wiki /is client side only AFAICS.....

*How To Debug the WebTier using CGI MapAgent*

   1. Build the debug version of
          CgiAgent = mapagent.exe
   2. Replace the standard version in the web application
   3. Debug the CGI Agent:
      Set the DebugPause timeout property in  the webconfig.ini of
      mapguide webapp
      to a time long enough to connect the debugger to the mapagent
      process in Visual Studio.
      This process shows up after the request is made and has  a pause
      at after startup.
      So if you put a breakpoint after the pause (CgiAgent.cpp line ~150)
      you can catch it by attaching to the WebAgent.exe process within
      the pause time.

        But beware:/
        When the clients connect to the webserver the first time they do
        not authenticate.
        Only when the server replies with an Authentication request they do.
        So the first time you catch the Mapagent with the debugger it
        will never connect to the server.
        You have to catch the mapagent a second time after the
        authentication failure which will include the authentication
        credentials and do the connection! /

*How To Debug the WebTier using ISAPI MapAgent???


   1. Build the debug version of
          IsapiAgent = isapi_MapAgent.dll
   2. Replace the standard version in the web application
   3. Attaching the visual studio debugger to inetinfo.exe does not
      enable the breakpoint in isapi_Mapagent.dll
      Anyone ideas on this?

UV wrote:
> Hi all,
> I need some information about how authentication is implemented between
> the mapguide clients and the mapagent CGI.
> I did some debugging of the webagent which showed that no conditions to
> authorize the access are meet regarding the environment variables passed
> in via the HTTP request from the mapguide client applications.
> I am able to access the server via a browser using mapadmin and request
> some data.
> The first authentication also fails but causes the browser to prompt me
> with a login window.
> The subsequent request then has the HTTP_AUTHORIZATION variable set
> which permits the request to be passed on the the mapguide server.
> When I try to access the mapagent with maestro or mapguide studio this
> and the failed authentication simply fails the login of the client.
> Can someone shed some light on this please?
> Which values are supposed to be passed from the mapguide clients?
> Thanks
> UV
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals

More information about the mapguide-internals mailing list