<html><head></head><body><div class="ydp9969a350yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div dir="ltr" data-setdir="false">Thank you Jackie.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">It worked! :)</div><div><br></div>
        
        </div><div id="yahoo_quoted_5469960393" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Monday, 22 May 2023 at 06:49:58 GMT-4, Jackie Ng <jumpinjackie@gmail.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv3891822162"><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 rel="nofollow noopener noreferrer" target="_blank" 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="yiv3891822162gmail_signature_prefix">-- </span><br><div dir="ltr" class="yiv3891822162gmail_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>
</div>_______________________________________________<br>mapguide-users mailing list<br><a ymailto="mailto:mapguide-users@lists.osgeo.org" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br></div>
            </div>
        </div></body></html>