I have tried to run it, but I got following error :<div><br></div><div><font class="Apple-style-span" color="#500050" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><font class="Apple-style-span" color="#000000">Execute of corflags.exe  failed</font></font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><font class="Apple-style-span" color="#000000"><br></font></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><font class="Apple-style-span" color="#000000">Execute of ildasm.exe /? failed</font></font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><font class="Apple-style-span" color="#000000">An unexpected processing error did occur: System.NullReferenceException: Object</font></font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><font class="Apple-style-span" color="#000000">reference not set to an instance of an object.</font></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><font class="Apple-style-span" color="#000000">   at Signer.Executor.GetInvalidCommands()</font></font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><font class="Apple-style-span" color="#000000">   at Signer.Program.Execute()</font></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><font class="Apple-style-span" color="#000000">   at Signer.Program.Main(String[] args)</font></font></div>

<div><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="border-collapse: separate;"><font class="Apple-style-span" color="#500050" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>

</span></font></span></font></div></span></font></div><div>I will wait your information. Thanks!</div><div>Dejan<br><br><div class="gmail_quote">On Fri, Jan 15, 2010 at 10:13, Kenneth Skovhede, GEOGRAF A/S [via OSGeo.org] <span dir="ltr">&lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4397794&i=0" target="_top" rel="nofollow">[hidden email]</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">

You only need an updated MapGuideDotNetApi if you are using the 
<br>LocalNativeConnection.
<br>I will upload the updated signed dll files later today (appx 20:00 GMT)
<br><br>If you cannot wait, the command to sign MapGuideDotNetApi is:
<br>signer.exe -k maestroapi.key -outdir .\out -a MapGuideDotNetApi.dll
<br><br>Signer.exe and the key is in SVN:
<br><a href="http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/Signer/Signer.exe?format=raw" rel="nofollow" target="_blank">http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/Signer/Signer.exe?format=raw</a><br>

<a href="http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/maestroapi.key?format=raw" rel="nofollow" target="_blank">http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/maestroapi.key?format=raw</a><br>

<br>The bindingRedirect setup is as follows:
<br>&lt;?xml version=&quot;1.0&quot;?&gt;
<br></div><div class="im">&lt;configuration&gt;
<br>&lt;runtime&gt;
<br>&lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;&gt;
<br>&lt;dependentAssembly&gt;
<br>&lt;assemblyIdentity name=&quot;MapGuideDotNetApi&quot; 
<br>publicKeyToken=&quot;f526c48929fda856&quot; /&gt;
<br><br></div>&lt;!--
<br><div class="im">                 NOTE: href MUST be absolute, alternative is to just rename
<br>                 the desired version of the file and replace 
<br>MapGuideDotNetApi.dll
<br><br>                 If you choose the rename option, remove the &lt;codeBase&gt; 
<br>tags below,
<br>                 but keep the &lt;bindingRedirect&gt;
<br>             --&gt;
<br>&lt;codeBase version=&quot;1.2.0.4103&quot; href=&quot;MapGuideDotNetApi-1.2.dll&quot;/&gt;
<br>&lt;codeBase version=&quot;2.0.0.2308&quot; href=&quot;MapGuideDotNetApi-2.0.dll&quot;/&gt;
<br>&lt;codeBase version=&quot;1.0.0.1&quot; href=&quot;MapGuideDotNetApi-2.1.dll&quot;/&gt;
<br><br>&lt;!-- Activate MGOS 1.2, MGEP 2008 --&gt;
<br>&lt;!-- &lt;bindingRedirect oldVersion=&quot;2.0.0.2308&quot; newVersion=&quot;1.2.0.4103&quot; /&gt; --&gt;
<br><br>&lt;!-- Activate MGOS 2.0, MGEP 2009 , *default* --&gt;
<br>&lt;!-- &lt;bindingRedirect oldVersion=&quot;2.0.0.2308&quot; newVersion=&quot;2.0.0.2308&quot; /&gt; --&gt;
<br><br>&lt;!-- Activate MGOS 2.1, MGEP 2010 --&gt;
<br>&lt;bindingRedirect oldVersion=&quot;2.0.0.2308&quot; newVersion=&quot;1.0.0.1&quot; /&gt;
<br><br>&lt;/dependentAssembly&gt;
<br>&lt;/assemblyBinding&gt;
<br>&lt;/runtime&gt;
<br>&lt;/configuration&gt;
<br><br></div><div class="im">Regards, Kenneth Skovhede, GEOGRAF A/S
<br><br></div><div class="im">On 15-01-2010 09:41, Dejan Gregor wrote:
</div><div><div><div></div><div class="h5"><div class='shrinkable-quote'><br>&gt; Kenneth,
<br>&gt;
<br>&gt; I am using the verion 2.1.0.3505 for MapGuideDotNetApi. Where should I set
<br>&gt; the version value (newVersion or oldVersion) and is the publicKeyToken still
<br>&gt; &#39;f526c48929fda856&#39;?
<br>&gt;
<br>&gt; I am using MGE 2010.
<br>&gt;
<br>&gt; Dejan
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; Kenneth Skovhede, GEOGRAF A/S wrote:
<br>&gt;    
<br>&gt;&gt; The &quot;Invalid Stream Header&quot; is a sort-of catch-all exception that happens
<br>&gt;&gt; when the MapGuide service tries to de-serialize an object, and finds
<br>&gt;&gt; something it does not expect.
<br>&gt;&gt; The usual cause of this is the other (unmanaged) binaries.
<br>&gt;&gt;
<br>&gt;&gt; The MapGuideDotNet.dll file is a thin wrapper that just calls the
<br>&gt;&gt; unmanaged dll&#39;s.
<br>&gt;&gt;
<br>&gt;&gt; So you can bind .Net to either version of the managed dll, but you MUST
<br>&gt;&gt; have the correct
<br>&gt;&gt; unmanaged dll&#39;s in the bin folder.
<br>&gt;&gt;
<br>&gt;&gt; Alternatively, you can fix the binding through the Web.config file:
<br>&gt;&gt; &lt;configuration&gt;
<br>&gt;&gt;    &lt;runtime&gt;
<br>&gt;&gt;      &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot;&gt;
<br>&gt;&gt;        &lt;dependentAssembly&gt;
<br>&gt;&gt;          &lt;assemblyIdentity name=&quot;MapGuideDotNetApi&quot;
<br>&gt;&gt; publicKeyToken=&quot;f526c48929fda856&quot; /&gt;
<br>&gt;&gt;          &lt;bindingRedirect oldVersion=&quot;2.0.0.2308&quot; newVersion=&quot;1.2.0.4103&quot;
<br>&gt;&gt; /&gt;
<br>&gt;&gt;        &lt;/dependentAssembly&gt;
<br>&gt;&gt;      &lt;/assemblyBinding&gt;
<br>&gt;&gt;    &lt;/runtime&gt;
<br>&gt;&gt; &lt;/configuration&gt;
<br>&gt;&gt;
<br>&gt;&gt; Replace the publicKeyToken and version as you please.
<br>&gt;&gt;
<br>&gt;&gt; There was a slight change with MgDisposable/MgGuardedDisposable some
<br>&gt;&gt; time ago.
<br>&gt;&gt; If you run into that, you have to use the re-bind option described above.
<br>&gt;&gt;
<br>&gt;&gt; Regards, Kenneth Skovhede, GEOGRAF A/S
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt; MacNair skrev:
<br>&gt;&gt;      
<br>&gt;&gt;&gt; We have a Mapguide application developed using MGE 2009’s library.  This
<br>&gt;&gt;&gt; application does most of its work by calling methods from another DLL
<br>&gt;&gt;&gt; called
<br>&gt;&gt;&gt; “MGEUtils.DLL”. This DLL references “MapGuideDotNet.DLL”.
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; The application works fine on the development machine where MGE is
<br>&gt;&gt;&gt; installed. But on the deployment machine where MapGuide Open Source (MGOS
<br>&gt;&gt;&gt; 2.0.2.3011) is installed we are getting a few errors.
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Should we recompile the class library “MGEUtils” referencing MGOS’s
<br>&gt;&gt;&gt; MapGuideDotNet.DLL?
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; The calls made to the methods in MGEUtils to initialize the application
<br>&gt;&gt;&gt; are
<br>&gt;&gt;&gt; throwing a few errors as given under. Note: The function definitions for
<br>&gt;&gt;&gt; these methods are given in Appendix below:
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; // Initialize the webtier
<br>&gt;&gt;&gt; string sErrMsg = &quot;&quot;;
<br>&gt;&gt;&gt; mgeUtils.InitializeWebTier(configPath, sErrMsg);
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; // Validate the user login and create a session
<br>&gt;&gt;&gt; mgeUtils.InitialiseSession(&quot;Anonymous&quot;, &quot;&quot;, ref sessionId, ref sErrMsg);
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Note:  The function definitions for the above calls within MGEUtils are
<br>&gt;&gt;&gt; given at the end of this document.
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Errors encounterd are…
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; CASE I: Placing MGE’s MapGuideDotNet.dll  along with “MGEUtils.DLL”  in
<br>&gt;&gt;&gt; the
<br>&gt;&gt;&gt; application’s bin directory.
<br>&gt;&gt;&gt; Error @ LINE: mgeUtils.InitialiseSession(&quot;Anonymous&quot;, &quot;&quot;, ref sessionId,
<br>&gt;&gt;&gt; ref
<br>&gt;&gt;&gt; sErrMsg);
<br>&gt;&gt;&gt; Error details: OSGeo.MapGuide.MgInvalidStreamHeaderException: Invalid
<br>&gt;&gt;&gt; stream
<br>&gt;&gt;&gt; header exception
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; CASE II: Placing MGOS ’s MapGuideDotNet.dll  along with “MGEUtils.DLL”
<br>&gt;&gt;&gt; in
<br>&gt;&gt;&gt; the application’s bin directory.
<br>&gt;&gt;&gt; Error @ LINE: mgeUtils.InitializeWebTier(configPath, sErrMsg);
<br>&gt;&gt;&gt; Error details: Could not load file or assembly &#39;MapGuideDotNetApi,
<br>&gt;&gt;&gt; Version=2.0.0.3202, Culture=neutral, PublicKeyToken=6416a18f8953383b&#39; or
<br>&gt;&gt;&gt; one
<br>&gt;&gt;&gt; of its dependencies. The located assembly&#39;s manifest definition does not
<br>&gt;&gt;&gt; match the assembly reference. (Exception from HRESULT: 0x80131040)
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Any help on this? Sorry for the lengthy mail. Thanks!
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; Function defintions
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt; public bool InitializeWebTier(string configPath, string csErrMsg)
<br>&gt;&gt;&gt; {
<br>&gt;&gt;&gt;     try
<br>&gt;&gt;&gt;     {
<br>&gt;&gt;&gt;       // Check if the webConfig file exists
<br>&gt;&gt;&gt;       if (!File.Exists(configPath)) { return false; }
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;       MapGuideApi.MgInitializeWebTier(configPath);
<br>&gt;&gt;&gt;         return true;
<br>&gt;&gt;&gt;      }
<br>&gt;&gt;&gt;      catch (MgConnectionFailedException mge)
<br>&gt;&gt;&gt;      {
<br>&gt;&gt;&gt;         csErrMsg = mge.GetMessage();
<br>&gt;&gt;&gt;         return false;
<br>&gt;&gt;&gt;      }
<br>&gt;&gt;&gt; }
<br>&gt;&gt;&gt; public bool InitialiseSession(string userName, string userPwd, ref string
<br>&gt;&gt;&gt; sessionId, ref string csErrMsg)
<br>&gt;&gt;&gt; {
<br>&gt;&gt;&gt;    try
<br>&gt;&gt;&gt;    {
<br>&gt;&gt;&gt;     // Validate user login
<br>&gt;&gt;&gt;     MgUserInformation userInfo = new MgUserInformation(userName, userPwd);
<br>&gt;&gt;&gt;     MgSite site = new MgSite();
<br>&gt;&gt;&gt;     site.Open(userInfo);
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;     // Create a session
<br>&gt;&gt;&gt;     sessionId = site.CreateSession();
<br>&gt;&gt;&gt;    }
<br>&gt;&gt;&gt;    catch (MgConnectionFailedException mge)
<br>&gt;&gt;&gt;    {
<br>&gt;&gt;&gt;     csErrMsg = mge.GetMessage();
<br>&gt;&gt;&gt;     return false;
<br>&gt;&gt;&gt;    }
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;    return true;
<br>&gt;&gt;&gt; }
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;
<br>&gt;&gt;&gt;        
<br>&gt;&gt; _______________________________________________
<br>&gt;&gt; mapguide-users mailing list
</div></div></div>&gt;&gt; <a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=4397661&amp;i=0" rel="nofollow" target="_blank">[hidden email]</a>
<br><div class="im">&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" rel="nofollow" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><div class='shrinkable-quote'><br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt;      
<br>&gt;
<br>&gt; -----
<br>&gt;
<br>&gt; Dejan Gregor, MSc
<br>&gt; GISc Researcher and Consultant
<br>&gt;
<br>&gt; <a href="http://www.linkedin.com/in/dgregor" rel="nofollow" target="_blank">http://www.linkedin.com/in/dgregor</a><br>&gt;    
</div></div><div class="im">_______________________________________________
</div>mapguide-users mailing list
<br><a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=4397661&amp;i=1" rel="nofollow" target="_blank">[hidden email]</a>
<br></div><div class="im"><a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" rel="nofollow" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>

</blockquote></div><br></div>
<div class="signature"><br>Dejan Gregor, MSc 
<br>GISc Researcher and Consultant 
<br><br><a href="http://www.linkedin.com/in/dgregor" target="_top" rel="nofollow">http://www.linkedin.com/in/dgregor</a>&nbsp;</div>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Application-compatibility-b-w-MGE2009-and-MGOS-2-0-2-tp1819071p4397794.html">Re: [mapguide-users] Application compatibility b/w MGE2009 and MGOS  2.0.2</a><br>
Sent from the <a href="http://n2.nabble.com/MapGuide-Users-f1803227.html">MapGuide Users mailing list archive</a> at Nabble.com.<br>