This project has moved and is read-only. For the latest updates, please go here.

Can't publish website to server

Topics: General Topics, SharpMap Project, SharpMap v0.9 / v1.x, Web Controls
Nov 25, 2010 at 12:53 AM

Locally I have a website sucessfully using sharmap... Everything works ok.


When I make publish the website, and copy it to the webserver it gives an error like this: "Could not load file or assembly 'SharpMap' or one of its dependencies. An attempt was made to load a program with an incorrect format." The target platform is 3.5 and the server is Windows 2008. Am I missing something here? I've read other threads talking about "Strong Name", but I can't compile the project using "Strong Name" because I am using some 3rd party dlls that won't work with this option... Is there something I could do to solve this problem?


Thanks in advance for your help!

Nov 25, 2010 at 7:52 AM

Hello hulkman,

you may want to check if your build targets a specific platform (x86|x64) which does not suit your server.

Hth FObermaier

Nov 25, 2010 at 9:15 AM

that isn't a problem because the website had previously worked ok... Only when I added sharpmap  those problems appeared!

Nov 25, 2010 at 9:31 AM
Edited Nov 25, 2010 at 9:31 AM

could you post the full stack trace then?


Nov 25, 2010 at 9:57 AM

after my reply I went double checking and the server is x64... Maybe the sharpmap dll is x86 and this might be causing the problem?

Nov 25, 2010 at 10:04 AM

That was it!!! I just needed to check the "Enable 32 bit Applications" in the application pool of the IIS I was using. This url helped me:


Thanks for your help!

Nov 25, 2010 at 10:55 AM

Unfortunately now I have another error... I am trying to install this on IIS7, and when I try to open the getmap.aspx url, it doesn't work! Does anyone kknows something about this?

Nov 25, 2010 at 11:13 AM

I got it once again... just had to remove the sharpmap handler from the httphandlers section, and add it in the IIS7 handlers section like this:


<add name="SharpMap" verb="*" path="GetMap.aspx" preCondition="integratedMode" type="SharpMap.Web.HttpHandler,SharpMap" /> 

Aug 27, 2012 at 9:59 PM

hi FObermaier

Thanks for your answer in previous posts

error Assembly not load SharpMap
Projects worked on Windows 7
Works without error

When we Pablysh website In Windows Server 2008

Sql Server R 2
C #

Only problem is on Windows Server 2008.
Project should be run on Windows Server 2008.
error> Assembly not load SharpMap
To fix this error, what should we