<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Nelson,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I
avoided recompiling any DLLs.&nbsp; I used what was provided.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is
your VS project referencing the mapscript DLL in your Debug/Release folder or is
it referencing the one in your C:\Program Files\MS4W folder?&nbsp; Since I have
a C# app, I have a VS project reference to just the mapscript_csharp.dll file
in a common 3<sup>rd</sup> party DLLs folder under my source code project.&nbsp;
When this loads, it will attempt to load the other dependent DLLs.&nbsp; Try
that approach with your C# app to see if you can narrow the problem.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Brian<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Nelson Soto
[mailto:nellyfromma@gmail.com] <br>
<b>Sent:</b> Monday, August 25, 2008 8:48 AM<br>
<b>To:</b> Hulbert, Brian<br>
<b>Subject:</b> Re: [mapserver-users] MapServer and .NET?<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<div>

<p class=MsoNormal>Thank you sir. Indeed you had a couple more dll's than I but
still after moving more over I receive the same error. I am trying to run a <a
href="http://vb.net">vb.net</a> project but I also have a c# one that produces
the same error. The tutorial says I can use the mapscript.dll and
mapscript_csharp.dll that is in ms4w. Did you find that to be true or had you
compiled your own?<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>Also, I think it's worth noting: I used the newest version
of MS4W that seems only weeks old... It now has a nice installer that allows
you to specify the installation path where previously it demanded to be
installed in the root ex: C:\ms4w or D:\ms4w... Since I was able to choose, I
chose C:\program files\ms4w.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Would this be an issue do you
think?<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>On Mon, Aug 25, 2008 at 8:25 AM, Hulbert, Brian &lt;<a
href="mailto:brian.hulbert@linquest.com">brian.hulbert@linquest.com</a>&gt;
wrote:<o:p></o:p></p>

<div>

<div>

<p><span style='font-size:11.0pt;color:#1F497D'>I can't speak specifically to <a
href="http://asp.net/" target="_blank">ASP.NET</a> but for C#, I place all of
the MapScript-related DLLs in the same directory as my C# application
executable.&nbsp; Below are the files that I have in my Debug or Release folder
for MapServer 5.0.2</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>cfitsio.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>gdal15.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>geos_c.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>geotiff.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>hdf5dll.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>iconv.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>jbig1.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libcurl.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libeay32.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libecwj2.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libexpat.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libfcgi.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libmap.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libmysql.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libpq.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libtiff.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>libxml2.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>lti_dsdk_dll.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>mapscript.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>mapscript_csharp.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>netcdf.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>pdflib.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>proj.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>sqlite3.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>ssleay32.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>szlibdll.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>xerces-c_2_7.dll</span><span
style='font-size:11.0pt;color:#1F497D'><br>
</span><span style='font-size:11.0pt;color:#1F497D'>zlib1.dll</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>HTH,</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;Brian</span><o:p></o:p></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><b><span
style='font-size:10.0pt'>From:</span></b><span style='font-size:10.0pt'> <a
href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>
[mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Nelson Soto<br>
<b>Sent:</b> Monday, August 25, 2008 8:10 AM<br>
<b>To:</b> Mapserver-users<br>
<b>Subject:</b> [mapserver-users] MapServer and .NET?</span><o:p></o:p></p>

</div>

<div>

<div>

<div>

<div>

<p>&nbsp;Hi Guys,<o:p></o:p></p>

</div>

<div>

<p>&nbsp;I am following the tutorial on <a
href="http://www.paolocorti.net/2006/09/20/mapserver-tutorial-for-c-mapscript-asp-net/"
target="_blank">http://www.paolocorti.net/2006/09/20/mapserver-tutorial-for-c-mapscript-asp-net/</a>&nbsp;regarding
getting started with MapServer on .Net. I eventually hit a snag where I run
into error &quot;The type initializer for 'OSGeo.MapServer.mapscriptPINVOKE'
threw an exception&quot; when trying to run the demo application. I have tried
several demo projects in Visual Studio and I receive the same errors. Running
down the stack, this seems to be the general exception:<o:p></o:p></p>

</div>

<div>

<p>&nbsp;&nbsp;{&quot;Unable to load DLL 'mapscript': The specified module
could not be found. (Exception from HRESULT: 0x8007007E)&quot;}<o:p></o:p></p>

</div>

<div>

<p>&nbsp;This happens even with projects that are coming with there own
mapserver.dll and all other necessary filesinthe bin folder. Does anyone have
any experience with dealing with MapServer on .Net and can anyone help me or
point me in the right direction. Right now I guess I am looking at downloading
Dependancy Walker to try to see if I can get further into this exception, but I
just want to know if anyone else has ever run into this before.<o:p></o:p></p>

</div>

<div>

<p>&nbsp;Thanks,<o:p></o:p></p>

</div>

<div>

<p>Nelson Soto<o:p></o:p></p>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

</body>

</html>