'OSGeo.MapGuide.MgException' does not contain a definition for 'GetMessage'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

'OSGeo.MapGuide.MgException' does not contain a definition for 'GetMessage'

yof85
This post has NOT been accepted by the mailing list yet.
Hello everyone

I'm using Mapguide 2.2 in my iis 5.1 server with windows xp. I'm using the Sheboygan sample package

http://localhost/mapguide/dotnetviewersample/ajaxtiledviewersample.aspx

when I enter in the tasks menu and select "Find Address" I get this exception in the right frame:

Server Error in '/mapguide/dotnetviewersample' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1061: 'OSGeo.MapGuide.MgException' does not contain a definition for 'GetMessage' and no extension method 'GetMessage' accepting a first argument of type 'OSGeo.MapGuide.MgException' could be found (are you missing a using directive or an assembly reference?)

Source Error:


Line 42:     catch (MgException e)
Line 43:     {
Line 44:         errorMsg = e.GetMessage();
Line 45:         errorDetail = e.GetDetails();
Line 46:     }


Source File: c:\Archivos de programa\OSGeo\MapGuide\Web\www\dotnetviewersample\theme\thememain.aspx    Line: 44


Compiler Warning Messages:

Show Detailed Compiler Output:

Show Complete Compilation Source:


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


I have no idea what's going on, am I missing something?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: 'OSGeo.MapGuide.MgException' does not contain a definition for 'GetMessage'

Jackie Ng
The call should now be ex.GetExceptionMessage()

If this sample code hasn't been modified, then it's a bug.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: 'OSGeo.MapGuide.MgException' does not contain a definition for 'GetMessage'

yof85
This post has NOT been accepted by the mailing list yet.
Thanks for the reply

I got the dotnetviewersample sample from the osgeo.org webpage, but thanks for your help