Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

6 REPLIES 6
Reply
Message 1 of 7
jorgeolimpia
1245 Views, 6 Replies

MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

Hello, how are you?

 

I'm trying to find a solution for this problem and I'd like to know if some of you have seen something like this.

I develop a web application which use MapGuideAPI (MapGuideApiDotNet) and it was running well on .NET Framework 2.0. However, that application was updated to .NET Framework 4.0 and when the web page tries to initialize MapGuideAPI, using the method MapGuideApi.MgInitializeWebTier(webconfig.ini), I receive an MgUnclassifiedException.

I tried to update my MapGuide to 2011 version (actually I'm running 2010 version) but the error persists.

But the most uncommon behavior is that after trying to run the application some times, the error doesn't occur.

I'm running Windows XP SP3, IIS 5, MapGuide2010 and Visual Studio 2010 w/ .NET 4.0. I've made some tests in a server running Windows 2003 R2 and IIS 6 but the same error appears.

 

Any comments or solutions, please let me know.

 

Regards,

 

 

Jorge Olimpia

Brazil

6 REPLIES 6
Message 2 of 7
jackie.ng
in reply to: jorgeolimpia

Check out the useLegacyV2RuntimeActivationPolicy setting in your web.config file (google for it. It's a common issue with loading CLR 2.0 assemblies into a CLR 4.0 process)

 

- Jackie

Message 3 of 7
jorgeolimpia
in reply to: jackie.ng

Hi Jackie, how are you?

 

Thanks for the tip. I checked at MSDN Library how to use this parameter and set it in my web.config file but unfortunately it didn't work.

I'm still looking for a solution to this issue and I'll publish it if I find it.

 

Best regards,

 

 

Jorge Olimpia

Brazil

Message 4 of 7
RCALLAWAY
in reply to: jorgeolimpia

I am also experiencing this issue.  It has been intermittent and we are at a loss as of now.  Any help would be greatly appreciated.

Message 5 of 7
Daniel.Du
in reply to: RCALLAWAY

MapGuide has not been migrated to asp.net 4.0 yet. So please make sure your app pool is using asp.net 2.0.



Daniel Du
Developer Technical Services
Autodesk Developer Network

Message 6 of 7
RCALLAWAY
in reply to: Daniel.Du

Yes, the AppPool running this is 2.0, as you can see by the .NET version line at the bottom of the image I attached.

 

We do have .NET 4.0 installed on this server running in a different AppPool.  Are there any known issues with that configuration?

 

Thanks,

 

- Ramsey

Tags (2)
Message 7 of 7
Daniel.Du
in reply to: RCALLAWAY

Have you ever checked the version of MapGuide assemblies your are referecing?  You should alsways copy all *.dll from <MapGuide WebExtension>\www\MapViewerNet\bin to <yourApp>\Bin folder.

 

And make sure your are using the same file webconfig.ini as the one in <MapGuide WebExtension>\www\ when initialize webtier.

 

You may get some unexpected problems if you are using different versions.



Daniel Du
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report