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

Trevor Wekel trevor_wekel at otxsystems.com
Wed Dec 10 00:25:27 EST 2008


Hi UV,

Jason is correct.  IIS spins up worker processes to handle the ISAPI
mapagent.  I don't have a MapGuide installing sitting in front of me right
now but I think the process is called dllhost.exe and it should be owned by
the I_USR_(machinename) account which IIS sets up.  If you attach to this
process, you should be able to debug the mapagent.

Thanks,
Trevor

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of UV
Sent: Tuesday, December 09, 2008 8:09 PM
To: MapGuide Internals Mail List
Subject: Re: [mapguide-internals] Problem with Authorization/Authentication
of mapguide clients (not browser) in mapagent CGI [SOLVED] HOW TO DEBUG the
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