<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<BR><BR>
<META name=Generator content="Microsoft SafeHTML">
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</STYLE>
<BR>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>I have been chasing these issues for days now and I could really use some help from someone that is familiar with Mapguide. The sample map loads up just fine using the Maestro Preview tool. The problem is while trying to implement using vb.net Please see the following info.</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><B><FONT size=3><FONT face=Consolas>When run the code below in Debug mode I get the following Error.</FONT></FONT></B></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Could not load file or assembly 'MapGuideDotNetApi, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. </FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Exception Details: System.BadImageFormatException: Could not load file or assembly 'MapGuideDotNetApi, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Source Error: </FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. </FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Mapguide installed using MapGuideOpenSource-2.2.0.5518-RC3-x64.exe</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Windows 7 Enterprise 64 bit</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>IIS 7</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Visual Studio 2010, asp.net, VB.net code behind.</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><B><FONT size=3><FONT face=Consolas>With references to the following:</FONT></FONT></B></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet\bin\MapGuideDotNetApi.dll</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet\bin\OSGeo.MapGuide.Foundation.dll</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet\bin\OSGeo.MapGuide.Geometry.dll</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet\bin\OSGeo.MapGuide.MapGuideCommon.dll</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet\bin\OSGeo.MapGuide.PlatformBase.dll</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet\bin\OSGeo.MapGuide.Web.dll</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><B><FONT size=3><FONT face=Consolas>Default.aspx markup:</FONT></FONT></B></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P style="tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" class=ecxMsoNormal><SPAN style="FONT-FAMILY: Consolas; BACKGROUND: yellow; FONT-SIZE: 10pt">&lt;%</SPAN><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 10pt">@</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 10pt">&nbsp;<SPAN style="COLOR: maroon">Page</SPAN>&nbsp;<SPAN style="COLOR: red">Language</SPAN><SPAN style="COLOR: blue">="vb"</SPAN>&nbsp;<SPAN style="COLOR: red">AutoEventWireup</SPAN><SPAN style="COLOR: blue">="false"</SPAN>&nbsp;<SPAN style="COLOR: red">CodeBehind</SPAN><SPAN style="COLOR: blue">="Default.aspx.vb"</SPAN>&nbsp;<SPAN style="COLOR: red">Inherits</SPAN><SPAN style="COLOR: blue">="mapguide4._Default"</SPAN>&nbsp;<SPAN style="BACKGROUND: yellow">%&gt;</SPAN><BR><SPAN>&nbsp;</SPAN><BR><SPAN style="COLOR: blue">&lt;!</SPAN><SPAN style="COLOR: maroon">DOCTYPE</SPAN>&nbsp;<SPAN style="COLOR: red">html</SPAN>&nbsp;<SPAN style="COLOR: red">PUBLIC</SPAN>&nbsp;<SPAN style="COLOR: blue">"-//W3C//DTD&nbsp;XHTML&nbsp;1.0&nbsp;Transitional//EN"</SPAN>&nbsp;<SPAN style="COLOR: blue">"<A href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target=_blank><SPAN><FONT color=#0000ff face="Times New Roman">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</FONT></SPAN></A>"&gt;</SPAN><BR><SPAN>&nbsp;</SPAN><BR><SPAN style="COLOR: blue">&lt;</SPAN><SPAN style="COLOR: maroon">html</SPAN>&nbsp;<SPAN style="COLOR: red">xmlns</SPAN><SPAN style="COLOR: blue">="<A href="http://www.w3.org/1999/xhtml" target=_blank><SPAN><FONT color=#0000ff face="Times New Roman">http://www.w3.org/1999/xhtml</FONT></SPAN></A>"&gt;</SPAN><BR><SPAN style="COLOR: blue">&lt;</SPAN><SPAN style="COLOR: maroon">head</SPAN>&nbsp;<SPAN style="COLOR: red">runat</SPAN><SPAN style="COLOR: blue">="server"&gt;</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">&lt;</SPAN><SPAN style="COLOR: maroon">title</SPAN><SPAN style="COLOR: blue">&gt;&lt;/</SPAN><SPAN style="COLOR: maroon">title</SPAN><SPAN style="COLOR: blue">&gt;</SPAN><BR><SPAN style="COLOR: blue">&lt;/</SPAN><SPAN style="COLOR: maroon">head</SPAN><SPAN style="COLOR: blue">&gt;</SPAN><BR><SPAN style="COLOR: blue">&lt;</SPAN><SPAN style="COLOR: maroon">body</SPAN><SPAN style="COLOR: blue">&gt;</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">&lt;</SPAN><SPAN style="COLOR: maroon">form</SPAN>&nbsp;<SPAN style="COLOR: red">id</SPAN><SPAN style="COLOR: blue">="form1"</SPAN>&nbsp;<SPAN style="COLOR: red">runat</SPAN><SPAN style="COLOR: blue">="server"&gt;</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">&lt;</SPAN><SPAN style="COLOR: maroon">div</SPAN><SPAN style="COLOR: blue">&gt;</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">&lt;/</SPAN><SPAN style="COLOR: maroon">div</SPAN><SPAN style="COLOR: blue">&gt;</SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;<SPAN style="COLOR: blue">&lt;/</SPAN><SPAN style="COLOR: maroon">form</SPAN><SPAN style="COLOR: blue">&gt;</SPAN><BR><SPAN style="COLOR: blue">&lt;/</SPAN><SPAN style="COLOR: maroon">body</SPAN><SPAN style="COLOR: blue">&gt;</SPAN><BR><SPAN>&nbsp; </SPAN><BR><SPAN style="COLOR: blue">&lt;/</SPAN><SPAN style="COLOR: maroon">html</SPAN><SPAN style="COLOR: blue">&gt;</SPAN></SPAN></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><B><FONT size=3><FONT face=Consolas>Using the following code:</FONT></FONT></B></P>
<P class=ecxMsoPlainText><SPAN><FONT size=3 face=Consolas>&nbsp;&nbsp; </FONT></SPAN></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Imports OSGeo.MapGuide</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Imports System.Xml</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Public Class _Default</FONT></P>
<P class=ecxMsoPlainText><FONT size=3><FONT face=Consolas><SPAN>&nbsp;&nbsp;&nbsp; </SPAN>Inherits System.Web.UI.Page</FONT></FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3><FONT face=Consolas><SPAN>&nbsp;</SPAN>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load</FONT></FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3><FONT face=Consolas><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Dim map As New MgMap</FONT></FONT></P>
<P class=ecxMsoPlainText><FONT size=3><FONT face=Consolas><SPAN>&nbsp;</SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></FONT></P>
<P class=ecxMsoPlainText><FONT size=3><FONT face=Consolas><SPAN>&nbsp;&nbsp;&nbsp; </SPAN>End Sub</FONT></FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>End Class</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Everything I’ve read indicates that this may be due to 32 bitness of the dlls.</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>Thank you,</FONT></P>
<P class=ecxMsoPlainText><FONT size=3 face=Consolas>&nbsp;</FONT></P>
<P class=ecxMsoPlainText><SPAN><FONT size=3><FONT face=Consolas>John </FONT></FONT></SPAN></P>                                               </body>
</html>