[mapguide-users] Fusion - Session ID invalid because thesession separator character was not found

Fraser Burgess fburgess at lakelandenergy.com
Mon Sep 14 15:14:31 EDT 2009


Hi Brian / List

 

I added your code to the Fusion taskpane.js file and it seems like the
session id is being obtained.  Many thanks for that bit of code.

 

I've done my best to jump this next hurdle on my own but have not had
any luck as of yet.  I'm now getting the following error message in the
task pane when I try and activate my search functions:

 


Resource was not found:
Session:e51e47f0-8364-102c-8000-005056c00008_en_7F0000010AF20AF10AF0//Ut
ilityMap.MapResource was not found:
Session:e51e47f0-8364-102c-8000-005056c00008_en_7F0000010AF20AF10AF0//Ut
ilityMap.Map


 


The Map resource used in the fusion layout is:  Library://Lakeland
Power/Maps/UtilityMap.MapDefinition


 


Would it appear to the experts on this list that this problem is more
about me not having filenames and paths set properly to match the code,
or would you think the problem is deeper rooted - for example how the
MAPNAME is handled in fusion.  


 


Thanks


Fraser


 


 


<!-- #Include File="../utilityfunctions.aspx" -->

 

String mgSessionId = GetRequestParameters()["SESSION"];

bool showClearButton = false;

 

try

{

    // Initialize the web-tier and connect to the Tux Site using

    // the Tux session identifier stored in PHP session state.

 

    InitializeWebTier();

    MgUserInformation userInfo = new MgUserInformation(mgSessionId);

    MgSiteConnection siteConnection = new MgSiteConnection();

    siteConnection.Open(userInfo);

 

    // Create a ResourceService object and use it to open the Map

    // object from the sessions repository. 

 

    MgResourceService resourceService =
siteConnection.CreateService(MgServiceType.ResourceService) as
MgResourceService;

    MgMap map = new MgMap();

    map.Open(resourceService, "UtilityMap");

 

    MgLayer layer = GetLayerByName(map, "ParcelMarker");

    showClearButton = (layer == null) ? false : layer.GetVisible();

}

 

 

catch (MgException mge)

{

    Response.Write(mge.GetMessage());

    Response.Write(mge.GetDetails());

}


%>


 


 

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Berdel,
Brian
Sent: Friday, September 11, 2009 9:12 AM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Fusion - Session ID invalid because
thesession separator character was not found

 

I updated the Taskpane.js file in the widgets folder to fix this issue.
It does not pass the parameters on load without this code I believe I
entered a ticket for this with new code a while back. 

 

Change your setContent function to this:

 

setContent: function(url) {

        if (this.nCurrentTask < this.aExecutedTasks.length) {

            this.aExecutedTasks.splice(this.nCurrentTask,
this.aExecutedTasks.length - this.nCurrentTask);

        }

        var map = this.getMap();

 

        var params = []; params.push('LOCALE=' + Fusion.locale);
params.push('SESSION=' + map.getSessionID()); params.push('MAPNAME=' +
map.getMapName()); if (url.indexOf('?') < 0) {

 

            url += '?';

 

        } else if (url.slice(-1) != '&') {

 

            url += '&';

 

        } url += params.join('&');

 

 

        this.aExecutedTasks.push(url);

        ++this.nCurrentTask;

        this.iframe.src = url;

        this.iframe.taskPaneId = this.widgetTag.name;

        this.updateButtons();

    },

 

Brian Berdel

McMahon Associates, Inc.

p: 215.283.9444 x 260

www.mcmtrans.com

 

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Fraser
Burgess
Sent: Thursday, September 10, 2009 1:54 PM
To: MapGuide Users Mail List
Subject: [mapguide-users] Fusion - Session ID invalid because the
session separator character was not found

 

Hi List.

I'm modifying the Ajax utility demo found here
http://enterprise.mapguide.com/utilitymap/ .  I made all my
modifications and had my shiny new application up and running in a basic
AJAX layout.  

I'm now trying to move it across to a Fusion layout.  All code works
fine in the basic web layout, but in the Fusion layout I get the error
below.  So I guess the question is how does Fusion differ from Ajax when
it comes to passing through a session ID?  Any code out there that shows
how this is done in fusion? 

Further to this, if I get across this initial hurdle, are there a pile
more waiting for me by taking something created for AJAX and cramming it
into Fusion?

Thanks for your help.

Fraser

________________________________

Invalid argument(s):
[1] = ""
The session ID is invalid because the session separator character was
not found. 

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code. 

Exception Details: OSGeo.MapGuide.MgInvalidArgumentException: Invalid
argument(s):
[1] = ""
The session ID is invalid because the session separator character was
not found.

Source Error: 

 

Line 34:             this.args = incomingArgs;

Line 35:             this.site = new MgSiteConnection();

Line 36:             this.site.Open(new
MgUserInformation(GetParameter(this.args, "session")));

Line 37:         }

Line 38:         

 

 

 

________________________________

Important notice to recipients:
Copies of documents that may be relied upon by you are limited to the
printed copies (also known as 'hard copies') that are signed and sealed
by the Engineer and/or Land Surveyor. Files in electronic formats, or
other types of information furnished by the Engineer and/or Land
Surveyor to you such as text, data or graphics are for your convenience
only. Any conclusions or information obtained or derived from such
electronic files will be at the user's sole risk. When transferring
documents in electronic formats, the Engineer and/or Land Surveyor makes
no representation as to long-term compatibility, usability, or
readability of the documents resulting from the use of software
application packages, operating systems or computer hardware differing
from those used by McMahon Associates, Inc. at the beginning of the
project.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090914/a610c0a9/attachment.html


More information about the mapguide-users mailing list