<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Try <br>
<font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">MgResourceIdentifier
mapName
= new MgResourceIdentifier("Session:" + sessionId +
"//Sheboygan.MapDefinition");<br>
<br>
<br>
Stefan Dalakov<br>
<br>
</span></font><a class="moz-txt-link-abbreviated" href="mailto:ravinder.singh@BIRLASOFT.COM">ravinder.singh@BIRLASOFT.COM</a> wrote:
<blockquote
cite="mid:176511108BBB7842992F0BF7B56EB6180658E2E4@INNOIDA.BIRLASOFT.COM"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City">
<o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Mangal;
        panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Book Antiqua";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</o:SmartTagType></o:SmartTagType></o:SmartTagType>
<div class="Section1">
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">Hi All,<o:p></o:p></span></font></p>
<p class="MsoNormal" style="text-indent: 0.5in;"><font
face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">I have created
the map
definition in maestro and also created a web layout, and I have
hundreds of
Maps, and each map will have a single layer, but I don’t want to create
the hundreds of maps for each single layer. For that purpose I though I
will
just make a single map and will associate the layer at run time to that
map. So
I wrote the following set of code for <st1:City w:st="on"><st1:place
w:st="on">Sheboygan</st1:place></st1:City>
sample<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">But when I reach
to map.Save(resourceSrvc,
mapName) <o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">it gives me the
error <o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">MgXmlParserException
{"An
exception occurred in the XML parser."}<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">And also I tried
with
Map.Open and then the following error comes<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">Resource was not
found:
Session:b275c3b6-ffff-ffff-8000-001a4bb4a756_en_7F0000010AFC0AFB0AFA//Samples/Sheboygan/Sheboygan.MapDefinition<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left: -0.5in; text-indent: 0.5in;"><font
face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">I have written
the following code<o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left: -0.5in; text-indent: 0.5in;"><font
face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left: -0.5in; text-indent: 0.5in;"><font
face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">MgUserInformation
userInfo = new MgUserInformation(defaultUser,
defaultPassword);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">
MgSite site = new MgSite();<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">
site.Open(userInfo);<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";"> sessionId =
site.CreateSession();<o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left: -0.5in; text-indent: 0.5in;"><font
face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">MgUserInformation
userInfo_new = new MgUserInformation(sessionId);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">
MgSiteConnection siteConnection = new MgSiteConnection();<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">
siteConnection.Open(userInfo_new);<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">MgResourceService
resourceSrvc =
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);
<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">MgResourceIdentifier
mapName
= new MgResourceIdentifier("Session:" + sessionId +
"//Samples/Sheboygan/Sheboygan.MapDefinition");<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">
MgMap map = new MgMap();<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">
map.Open(resourceSrvc,
mapName); // Here the problem comes<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">
map.Save(resourceSrvc,
mapName); // Here the problem comes</span></font><font
face="Book Antiqua" size="2"><span
style="font-size: 10pt; font-family: "Book Antiqua";"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Book Antiqua" size="2"><span
style="font-size: 10pt; font-family: "Book Antiqua";"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New";">I am using .net
aspx with map guide 2.0<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Book Antiqua" size="2"><span
style="font-size: 10pt; font-family: "Book Antiqua";"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><b><font color="gray" face="Book Antiqua"
size="2"><span
style="font-size: 10pt; font-family: "Book Antiqua"; color: gray; font-weight: bold;">Thanks
& Regards,<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><st1:PersonName w:st="on"><font color="gray"
face="Times New Roman" size="2"><span
style="font-size: 11pt; color: gray;">Ravinder Singh</span></font></st1:PersonName><font
color="gray" size="2"><span style="font-size: 11pt; color: gray;"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
</div>
<table>
<tbody>
<tr>
<td bgcolor="#ffffff"><font color="#000000">*********************************************************************************************************************************************************************<br>
"This message and any attachments are solely for the intended recipient
and may contain Birlasoft confidential or privileged information. If
you are not the intended recipient,any disclosure,copying, use, or
distribution of the information included in this message and any
attachments is <br>
prohibited. If you have received this communication in error, please
notify us by reply e-mail at (<a class="moz-txt-link-abbreviated" href="mailto:administrator@birlasoft.com">administrator@birlasoft.com</a>) and
permanently delete this message and any attachments. Thank you."<br>
*********************************************************************************************************************************************************************<br>
</font></td>
</tr>
</tbody>
</table>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
<br>
</body>
</html>