Infrastructure Map Server Developer

Infrastructure Map Server Developer

Reply
Active Member
jorgeolimpia
Posts: 6
Registered: ‎02-28-2011
Message 1 of 7 (818 Views)

MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

818 Views, 6 Replies
02-28-2011 09:25 AM

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

Valued Mentor
jackie.ng
Posts: 282
Registered: ‎10-06-2008
Message 2 of 7 (799 Views)

Re: MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

03-06-2011 06:13 PM 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

Active Member
jorgeolimpia
Posts: 6
Registered: ‎02-28-2011
Message 3 of 7 (784 Views)

Re: MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

03-09-2011 04:48 AM 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

New Member
RCALLAWAY
Posts: 2
Registered: ‎09-20-2011
Message 4 of 7 (659 Views)

Re: MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

09-20-2011 06:04 AM 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.

Board Manager
Daniel.Du
Posts: 215
Registered: ‎12-23-2008
Message 5 of 7 (650 Views)

Re: MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

09-20-2011 11:34 PM 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

New Member
RCALLAWAY
Posts: 2
Registered: ‎09-20-2011
Message 6 of 7 (641 Views)

Re: MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

09-22-2011 10:44 AM 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

Board Manager
Daniel.Du
Posts: 215
Registered: ‎12-23-2008
Message 7 of 7 (631 Views)

Re: MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

09-22-2011 07:52 PM 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.