• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk MapGuide Enterprise Developer

    Reply
    Active Member
    jorgeolimpia
    Posts: 6
    Registered: ‎02-28-2011

    MgUnclassifiedException trying to initialize MapGuideApi.MgInitializeWebTier

    565 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

    Please use plain text.
    Mentor
    Posts: 237
    Registered: ‎10-06-2008

    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

    Please use plain text.
    Active Member
    jorgeolimpia
    Posts: 6
    Registered: ‎02-28-2011

    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

    Please use plain text.
    New Member
    RCALLAWAY
    Posts: 2
    Registered: ‎09-20-2011

    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.

    Please use plain text.
    ADN Support Specialist
    Posts: 103
    Registered: ‎12-23-2008

    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

    Please use plain text.
    New Member
    RCALLAWAY
    Posts: 2
    Registered: ‎09-20-2011

    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

    Please use plain text.
    ADN Support Specialist
    Posts: 103
    Registered: ‎12-23-2008

    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

    Please use plain text.