I don't know if it is possible to read that information in the
task pane, but I'm guessing you can't.

If the DomInfo parameter is related to security, its
not a good idea to pass it like this, because
an evil user can change it very easily.

The integrated authentication can be set on a file
or directory level. If you run the .aspx from somewhere
outside the MapGuide folder, you should
be able to get the correct credentials.

Eg, your aspx would be in:
http://server/myapplication/start_page_for_task_pane.aspx

And in the weblayout, you set the start page to be:
/myapplication/start_page_for_task_pane.aspx

You then remove the "Allow anonymous access" in
IIS properties for the folder "myapplication",
and check the "Integrated Autentication" option.

It does not matter if the page is inside the
frames for the MapGuide viewer, or you call it directly,
the authentication works the same way.


Regards, Kenneth Skovhede, GEOGRAF A/S



Olyster skrev:
Kenneth,

thanks for your answer.

I want to retrieve user's domain info for another purpose ... not to
authenticate the user in MapGuide.

Since I get nothing when using my code in a page residing in the taskPane
but I can get it in my startpage, I want to pass it the the MapGuide using
GET method ... like WebLayout, Locale, etc ...

I have a startpage where I call the Mapguide page (ex:<iframe
src="/mapguide/mapviewerajax/?SESSION=???&WEBLAYOUT=???" />) and I pass the
domain information with an extra parameter &DomInfo=...
How can I retrieve this values from an aspx page residing in the TaskPane ?
I tried with request.querystring("DomInfo") but I get nothing ...

Thanks ... I'm almost there !


Kenneth Skovhede, GEOGRAF A/S wrote:
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.
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users



_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to