[mapguide-users] MapLayout Authorization demand

Jason Birch Jason.Birch at nanaimo.ca
Fri Mar 31 12:12:53 EST 2006


You have downloaded the dotnetviewer sample from here?

https://mapguide.osgeo.org/files/documents/12/17/dotnetviewersample.zip

It basically initiates a session with a fixed userid and password:

     MapGuideApi.InitializeSockets();
     InitializeWebTier();
     MgUserInformation userInfo = new MgUserInformation("Anonymous",
"");
     MgSite site = new MgSite();
     site.Open(userInfo);
     sessionId = site.CreateSession();
     MapGuideApi.TerminateSockets();

And then opens the ajax viewer in a frame:

    <frame src="/mapguide/mapviewernet/ajaxviewer.aspx?SESSION=<%=
sessionId %>&WEBLAYOUT=<%= webLayout %>" name="ViewerFrame">

I agree that it's risky to embed a password in the url, but I don't mind
embedding the username of the "Anonymous" user in the URL.  Unlike Andy,
I don't get prompted for authentication in IE.  I wonder what the
difference is.  I have tried with &USERNAME=Anonymous and with
&USERNAME=Anonymous&PASSWORD=  and neither prompts in IE, Opera, or
Firefox.

Jason
 

-----Original Message-----
From: Brian Flood [mailto:BFLOOD at SPATIALDATALOGIC.COM] 
Sent: Friday, March 31, 2006 09:01
To: 'users at mapguide.osgeo.org'
Subject: RE: [mapguide-users] MapLayout Authorization demand

thanks Andy, how are the OSMG demos working, I don't think I was
prompted when I viewed them?  Is there a walkthrough for using the .Net
viewers from another hosting page (like in the php example demos)

I was following the parameter discussions from yesterday, interesting
indeed. I'm not sure I like embedding user/pwd in urls though. 

cheers
brian

-----Original Message-----
From: Andy Morsell [mailto:amorsell at spatialgis.com]
Sent: Friday, March 31, 2006 11:54 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] MapLayout Authorization demand

I don't think you're missing anything.  The only way I've seen to open a
web layout without user login prompt is to embed it in a web page.  In
that page, you have to programmatically create a session based on a
valid user and pass the session at the URL.  The example applications
show this.
 
There was some discussion on GETMAP request parameters yesterday.  I
just tried adding &USERNAME=Anonymous to the URL.  In Internet Explorer,
I still get the user login dialog, but can just click on OK or Cancel
without entering anything and it opens fine.  With Firefox, I am not
prompted for login and the layout opens fine.

Andy Morsell, P.E. 
Spatial Integrators, Inc. 
http://www.SpatialGIS.com 

________________________________

From: Brian Flood [mailto:BFLOOD at SPATIALDATALOGIC.COM]
Sent: Friday, March 31, 2006 8:34 AM
To: 'users at mapguide.osgeo.org'
Subject: [mapguide-users] MapLayout Authorization demand



When I create a simple Map Layout and try to access it from a browser, I
always get the login screen. I thought if "Everyone" was assigned read
access to it, there would be no logon request. Again, I'm probably
missing
the obvious...

 

http://12.144.53.43/mapguide/mapviewerajax/?WEBLAYOUT=Library%3a%2f%2fMP
Adva
ncedMap.WebLayout

 

 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org






More information about the Mapguide-users mailing list