You mention the words "code behind" so I assume you are using either
ASP.net webforms or (pre-core) MVC?

In either case, do you have any init/startup code that calls the following?

MapGuideApi.MgInitializeWebTier("path/to/your/webconfig.ini");

If you don't, most of the MapGuide API will fail on you.

In webforms or legacy MVC, Application_Start() in Global.asax.cs is
generally a good place to insert such an init call. My legacy MVC sample
app inits the web tier in this spot:

https://github.com/jumpinjackie/mapguide-mvc-sample/blob/master/Sheboygan/Global.asax.cs#L16

Hope that helps,

- Jackie

You wrote:

Hi,
Im having a bit of a problem with Mapguide using on c# code behind
I was able to pass the sessionid
this is how i got the sessionid on script
mapWidget.aMaps[0].getSessionID()

then i pass it to the code behind:
                MgSiteConnection conn = new MgSiteConnection();
        MgUserInformation userinfo = new
MgUserInformation(sesscionId);                conn.open()
even if i use
  MgUserInformation userinfo = new MgUserInformation("Anonymous","")

i am always getting an error but the problem is the error is always,
doesnt explain anything


or "Failed to retrieve message for \"MgConfigurationException\"."
I am quite stuck now, anyone can help?
thanks



-- 
*Please Note: I no longer create new posts or post replies to any OSGeo
mailing list through nabble. As a result, you most likely won't see this
message appear on nabble's view of any OSGeo mailing list and may only see
this message through mailing list archives or depending on your mailing
list subscription settings, through daily message digests or automated
notifications from the mailing lists.*
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to