[mapguide-users] Getting User domain and username active directory from task pane

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Fri Jun 12 09:17:42 EDT 2009


There are a number of issues when doing this.

First, the .aspx files in MapGuide run in their own application pool,
and are not normally subjected to integrated authentication.
I'm not sure if it is possible to use integrated authentication
with MapGuide as it has some custom authentication.

Even if it is possible, you should not modify those files,
because you will get a hard time when upgrading MapGuide later on.

Instead, you can set a startup page that gets loaded in as the right side
pane. That page can be in another app pool, and have integrated 
authentication,
and you can put your own code in it.

You may also want to serve the map through a starting aspx page,
that outputs something like this:
<iframe src="/mapguide/mapviewerajax/?SESSION=???&WEBLAYOUT=???" />

You can also autologin the user in such a page.

Regards, Kenneth Skovhede, GEOGRAF A/S



Olyster skrev:
> Hi,
>
> I'm new to MapGuide.
>
> I want to retrieve active directory domain and user name from TaskPane. I
> used MapGuide Studio to create a web layout and I developed a webpage
> (RightPane.aspx) with Visual Web Developer to be displayed in the taskPane. 
>
> I have a header frame (containing HeaderFrame.aspx which is showing a
> banner) and the MapGuide frame below.
>
> >From the Header Frame, I can get user's active directory info using :
>
> Dim User As System.Security.Principal.IPrincipal
>
> User = System.Web.HttpContext.Current.User
> TxtUser.Text = User.Identity.Name
>
> Which returns the domain name and user name of the currently connected user.
>
> But If I try to get the same info with the same code in the page.load of
> RightPane.aspx, I get nothing and I can't debug the page. I have to set it
> as start page to debug it.
>
> I tried to go up to the HeaderFrame from RightPane.aspx using javascript but
> I get Access denied at a certain point (different domain I guess)
>
> So I'd like to know how I can debug a custom .aspx page which resides in the
> TaskPane and/or Get active directory info from a page which resides in the
> taskPane.
>
> I hope this is clear enough.
>
> Thanks for your help.
>   


More information about the mapguide-users mailing list