[mapguide-internals] Problem with Authorization/Authenticationof mapguide clients (not browser) in mapagent CGI [SOLVED] HOW TO DEBUGthe WebTier

Jason Birch Jason.Birch at nanaimo.ca
Tue Dec 9 22:58:34 EST 2008


Out of my depth, but perhaps you need to attach to the worker process (w3p.exe or something like that)?  For cgi debugging; I wonder if persisting the process using fast-cgi configured for a single instance would help. Fast-cgi was dropped in favour of isapi/apache modules for stability, but should still work though with a bit of manual setup.


trac.osgeo.org/mapguide is a wiki; if there isn't already an obvious place there for developer docs (can't check right now; on mobile) it would be a good place to add one.  I can help with this if you're interested. You need to sign into the site with an osgeo userid; addtl permissions may be required for editing, but not sure. 

(OT thread hijack follows)

I'm a bit worried about fragmentation of the mapguide knowledge base across multiple sites (the best practices wiki was an independant effort by autodesk without OS community involvement - apparently history has been forgotten) but with limited resources we only have ourselves to blame for that.  To alleviate this, I think we need stronger interlinking between the resources while encouraging/empowering users and developers to edit the Trac wiki.  I am encouraged that new developers are finding mapguide and starting to get involved despite the labyrinthine docs.

Looking forward to our next PSC meeting :)

Jason


----- Original Message -----
From: mapguide-internals-bounces at lists.osgeo.org <mapguide-internals-bounces at lists.osgeo.org>
To: MapGuide Internals Mail List <mapguide-internals at lists.osgeo.org>
Sent: Tue Dec 09 19:09:25 2008
Subject: Re: [mapguide-internals] Problem with Authorization/Authenticationof mapguide clients (not browser) in mapagent CGI [SOLVED] HOW TO DEBUGthe WebTier

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
> does NOT HAPPEN
> 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
>
>   

_______________________________________________
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