[mapguide-users] Avoiding Authentication Prompt on Startup

Walt Welton-Lair walt.welton-lair at autodesk.com
Mon Mar 26 17:57:25 EDT 2007


I'm not sure whether this is related to the problem - we did have an
authentication issue at one point with the DWF Viewer.  It was fixed in
November, but I don't know if you have the updated code.
 
In your WebServerExtensions directory under mapviewerxxx check your
mainframe.php (jsp or aspx - whichever flavor you chose) file.  At the
top should be a call to RequestAuthentication, with no checks against a
forDwf variable.
 
Here's the old code (taken from mainframe.aspx, but similar for the
others):
 
            if (forDwf != 0)
            {
                anonymousLogin = true;
                cred.SetMgUsernamePassword("Anonymous", "");
            }
            else
            {
                //AJAX viewer enforce login here. DWF viewer enforces
loggin during the inital GETMAP request
                RequestAuthentication();
                return;
            }
 
And here's the new code (all of the above is replaced by these two
lines):
 
            RequestAuthentication();
            return;
 
Make sure your mainframe file is updated.
 
Walt

  _____  

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Buscher,
Shane
Sent: Monday, March 26, 2007 11:37 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Avoiding Authentication Prompt on Startup



I'm actually getting prompted for MapGuide authentication.  Here's what
else I'm finding.  When the web application is hosted on the same box as
the site server (server has web extensions and site server installed),
I'm not prompted.  However, when I separate the web application from the
site server (two different servers) the problem still occurs.   Maybe
this is a coincidence?

 

Also, just to make sure I'm configured correctly, I'm only setting up
the 'mapguide' virtual directory with anonymous access.  The web
application is in a separate virtual that is only set up for windows
authentication for security reasons.  

 

-shane

 

  _____  

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Chris
Gountanis
Sent: Monday, March 26, 2007 11:44 AM
To: 'MapGuide Users Mail List'
Subject: RE: [mapguide-users] Avoiding Authentication Prompt on Startup

 

You need to allow Anon access within IIS to not get the Windows Auth box
popping up on you not to be confused with MapGuides Auth box which it
seems you might have covered already.

 

 

Chris 

 

 

  _____  

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Buscher,
Shane
Sent: Monday, March 26, 2007 11:22 AM
To: MapGuide Users Mail List
Subject: [mapguide-users] Avoiding Authentication Prompt on Startup

 

I can't seem to find a way to avoid users being prompted to authenticate
when they open up a MapGuide site for the first time.  After that, they
aren't prompted again.  You can cancel out of the authentication and
bypass it, but this isn't very elegant.  I'm using the DWF Viewer with
.NET/iis 6, and have the MapGuide virtual directories set to windows
authentication (anonymous access unchecked).  I am authenticating on my
default page with the code snippets below, then passing the session Id
and web Layout to the dwf viewer.  If anyone has a solution/workaround,
I'd much appreciate it.

Dim site As New MgSite()

Dim userInfo As New MgUserInformation(AppSettings("mgLogin"), _

      AppSettings("mgPassword"))

site.Open(userInfo)

Dim SessionId As String = site.CreateSession()

Dim WebLayout As String = AppSettings("webLayout")

.

.

.

<iframe id="ViewerFrame" width="100%" height="100%" frameborder="0"
src="/mapguide/mapviewernet/dwfviewer.aspx?SESSION=<%= SessionId
%>&WEBLAYOUT=<%= webLayout %>" >

    </iframe>

Regards,

Shane

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070326/7019c33e/attachment-0001.html


More information about the mapguide-users mailing list