Infrastructure Map Server Developer

Reply
Valued Contributor
swimming123
Posts: 86
Registered: ‎04-12-2012
Message 1 of 4 (1,478 Views)

Could not load 'MapGuideDotNetApi' warning message

1478 Views, 3 Replies
09-17-2012 07:40 AM

When I start to do customization for AIMS using VS2010 .NET4.0, I copy the .dll file to my project folder, add reference to5 OSGeo***.dll files.  I got the warning messageis as follows:

 

Warning           C:\Altus\AltusWebMap\AltusWebMap\Default.aspx: ASP.NET runtime error: Could not load file or assembly 'MapGuideDotNetApi' or one of its dependencies. An attempt was made to load a program with an incorrect format. C:\Abc\AbcWebMap\AbcWebMap\Default.aspx         1          1          AbcWebMap

 

How to fix this?  Is this the problem that cause my redline not working? Thank you.

Valued Mentor
jackie.ng
Posts: 273
Registered: ‎10-06-2008
Message 2 of 4 (1,474 Views)

Re: Could not load 'MapGuideDotNetApi' warning message

09-17-2012 07:50 PM in reply to: swimming123

You need to make sure your IIS application pool assigned to your web application is running at the same bit-ness as your version of AIMS/MapGuide

 

- Jackie

Valued Contributor
swimming123
Posts: 86
Registered: ‎04-12-2012
Message 3 of 4 (1,468 Views)

Re: Could not load 'MapGuideDotNetApi' warning message

09-18-2012 07:28 AM in reply to: jackie.ng

IIS Application pool is 64 bits, AIMS2013 is also 64bits, but my visual studio 2010 is 32 bits. It also matters,right?

Valued Mentor
jackie.ng
Posts: 273
Registered: ‎10-06-2008
Message 4 of 4 (1,462 Views)

Re: Could not load 'MapGuideDotNetApi' warning message

09-18-2012 09:00 PM in reply to: swimming123

If you're debugging with Visual Studio's built-in web server (or IIS express), it's probably a 32-bit process, which is why it can't load your 64-bit MapGuide assemblies.

 

Try setting up a virtual directory in IIS for your MapGuide/AIMS application (assigned to the same application pool as MapGuide/AIMS) and open that virtual dir with Visual Studio (probably need UAC elevation). This should let you debug with IIS proper and have all the bitnesses be the same.

 

- Jackie

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community