[mapserver-users] MapServer and .NET?

Hulbert, Brian brian.hulbert at linquest.com
Mon Aug 25 11:59:45 EDT 2008


I don't have experience yet with the latest release.maybe there is another
DLL dependency that wasn't present in my 5.0.2 release.  Can you easily put
the 5.0.2 DLLs in your application directory and update the project DLL
reference accordingly and give it a try?

 

From: Nelson Soto [mailto:nellyfromma at gmail.com] 
Sent: Monday, August 25, 2008 11:05 AM
To: Hulbert, Brian
Subject: Re: [mapserver-users] MapServer and .NET?

 

I have tried reference the file in my ms4w install directory, so:

C:\Program Files\ms4w\Apache\cgi-bin\mapscript\csharp

 

This was actually the first thing I tried but it have me the same error for
the first time so I experimented with hunting all dll's and copying them in
the application folder per recommendations but this caused me to receive the
same error. 

 

 

On Mon, Aug 25, 2008 at 9:01 AM, Hulbert, Brian <brian.hulbert at linquest.com>
wrote:

Nelson,

                I avoided recompiling any DLLs.  I used what was provided.

 

                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?  Since I have a C# app, I have a VS project reference to
just the mapscript_csharp.dll file in a common 3rd party DLLs folder under
my source code project.  When this loads, it will attempt to load the other
dependent DLLs.  Try that approach with your C# app to see if you can narrow
the problem.

 

Brian

 

From: Nelson Soto [mailto:nellyfromma at gmail.com] 
Sent: Monday, August 25, 2008 8:48 AM
To: Hulbert, Brian
Subject: Re: [mapserver-users] MapServer and .NET?

 

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 vb.net
<http://vb.net/>  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?

 

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.

 

Would this be an issue do you think?

On Mon, Aug 25, 2008 at 8:25 AM, Hulbert, Brian <brian.hulbert at linquest.com>
wrote:

I can't speak specifically to ASP.NET <http://asp.net/>  but for C#, I place
all of the MapScript-related DLLs in the same directory as my C# application
executable.  Below are the files that I have in my Debug or Release folder
for MapServer 5.0.2

cfitsio.dll
gdal15.dll
geos_c.dll
geotiff.dll
hdf5dll.dll
iconv.dll
jbig1.dll
libcurl.dll
libeay32.dll
libecwj2.dll
libexpat.dll
libfcgi.dll
libmap.dll
libmysql.dll
libpq.dll
libtiff.dll
libxml2.dll
lti_dsdk_dll.dll
mapscript.dll
mapscript_csharp.dll
netcdf.dll
pdflib.dll
proj.dll
sqlite3.dll
ssleay32.dll
szlibdll.dll
xerces-c_2_7.dll
zlib1.dll

HTH,

 Brian

 From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Nelson Soto
Sent: Monday, August 25, 2008 8:10 AM
To: Mapserver-users
Subject: [mapserver-users] MapServer and .NET?

 Hi Guys,

 I am following the tutorial on
http://www.paolocorti.net/2006/09/20/mapserver-tutorial-for-c-mapscript-asp-
net/ regarding getting started with MapServer on .Net. I eventually hit a
snag where I run into error "The type initializer for
'OSGeo.MapServer.mapscriptPINVOKE' threw an exception" 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:

  {"Unable to load DLL 'mapscript': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)"}

 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.

 Thanks,

Nelson Soto

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080825/d99a1c55/attachment.html


More information about the mapserver-users mailing list