<div dir="ltr"><div>You mention the words "code behind" so I assume you are using either ASP.net webforms or (pre-core) MVC?</div><div><br></div><div>In either case, do you have any init/startup code that calls the following?</div><div><br></div><div>MapGuideApi.MgInitializeWebTier("path/to/your/webconfig.ini");<br><br>If you don't, most of the MapGuide API will fail on you. </div><div><br></div><div>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:</div><div><br></div><div><a href="https://github.com/jumpinjackie/mapguide-mvc-sample/blob/master/Sheboygan/Global.asax.cs#L16">https://github.com/jumpinjackie/mapguide-mvc-sample/blob/master/Sheboygan/Global.asax.cs#L16</a><br></div><div><br></div><div>Hope that helps,</div><div><br></div><div>- Jackie</div><div><br></div>You wrote:<div><br></div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)">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</pre></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font size="1"><i>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.</i></font></div></div></div>