[mapguide-dev] problems with asp.net c# code
Jason Birch
Jason.Birch at nanaimo.ca
Thu Jun 29 12:58:24 EDT 2006
The MapGuide dev list is for developers working on the core MapGuide
code.
This message is copied to the "users" list; please subscribe there if
you haven't already.
Jason
-----Original Message-----
From: Christian Setzkorn [@setzkorn.eu]
Sent: Thursday, June 29, 2006 09:13
To: dev at mapguide.osgeo.org
Subject: [mapguide-dev] problems with asp.net c# code
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
More information about the Mapguide_users
mailing list