problems with asp.net c# code

Christian Setzkorn christian at setzkorn.eu
Thu Jun 29 12:12:32 EDT 2006


Hi,

I am using this code (I am currently just messing around to get an
understanding of mapguide):

<script runat="server">
    
</script>

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

<%
    String mgSessionId = GetParameters()["SESSION"];
    
    try
    {
        MapGuideApi.InitializeSockets();
        InitializeWebTier();

        MgUserInformation userInfo = new MgUserInformation("xxxx",
"yyyy");
        MgSiteConnection siteConnection = new MgSiteConnection();
        siteConnection.Open(userInfo);

        MgResourceService resourceService =
siteConnection.CreateService(MgServiceType.ResourceService) as
MgResourceService;
        MgMap map = new MgMap();
        map.Open(resourceService, "Sheboygan");

        Response.Write("$" + mgSessionId + "$");
    }
    catch (MgException mge)
    {
        String result = mge.GetMessage() + "<br><br>" +
mge.GetDetails();

        Response.ContentType = "text/html";
        Response.Write(result);
        MapGuideApi.TerminateSockets();
    }
 %>

Unfortunately, it throws an exception:

Invalid argument(s): [0] = " " The string cannot be empty.

Invalid argument(s): [0] = " " The string cannot be empty. Exception
occurred in method MgMap.Open at line 483 in file
c:\build_tux_area\mgdev\common\service\maplayer\Map.cpp

Could anyone please be so kind and provide me with some pointers to
overcome this problem? Many thanks.

Christian


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.6/378 - Release Date:
28/06/2006
 





More information about the Mapguide-internals mailing list