[mapguide-users] Getting started using Visual Studio 2005

Patrick Tsang pt at pat.ca
Sun Jul 1 21:03:39 EDT 2007


Hi Johannes,

Add this to your environment variables path
D:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\mapviewernet\bin;
because it refer other assemblies in this directory.

I think you may need to restart your computer don't remember is required or
not... give it a try...

Cheers,
Patrick


Johannes Elsinghorst-2 wrote:
> 
> Hi,
> 
> im trying to get into he developement of mapguide-webapps using VS2005
> and asp.net.
> I set up a new Webproject and added a reference to MapGuideDotNetApi.dll
> and also copied
> all the dlls from the dotnetviewer into my webapps bin folder.
> In the load-event of my default.aspx i added the following code:
> 
> protected void Page_Load(object sender, EventArgs e)
>         {
>             try
>             {
>                
> MapGuideApi.MgInitializeWebTier(@"C:/Programme/MapGuideOpenSource/WebServerExtensions/www/webconfig.ini");
>             }
>             catch (Exception ex)
>             {
>                 System.Diagnostics.Debug.WriteLine(ex.Message + "\n" +
> ex.StackTrace);
>             }
> 
>             MgUserInformation userInfo = new
> MgUserInformation("Anonymous", "");
>             MgSite site = new MgSite();
> 
>             site.Open(userInfo);
> 
>             sessionId = site.CreateSession();
>                 int debug=0;
>         }
> 
> MgInitializeWebTier-Method throws this Exception:
> 
> [DllNotFoundException: Unable to load DLL 'MapGuideUnmanagedApi': Das
> angegebene Modul wurde nicht gefunden. (Exception from HRESULT:
> 0x8007007E)]
>   
> SWIGExceptionHelper.SWIGRegisterCustomExceptionCallbacks_MapGuideApi(SWIGCustomExceptionDelegate
> customExceptionDelegate) +0
>    SWIGExceptionHelper..cctor() +70
> 
> [TypeInitializationException: The type initializer for
> 'SWIGExceptionHelper' threw an exception.]
>    SWIGExceptionHelper..ctor() +0
>    MapGuideApiPINVOKE..cctor() +60
> 
> [TypeInitializationException: The type initializer for
> 'MapGuideApiPINVOKE' threw an exception.]
>    MapGuideApiPINVOKE.new_MgUserInformation__SWIG_2(String jarg1, String
> jarg2) +0
>    OSGeo.MapGuide.MgUserInformation..ctor(String userName, String
> password) +34
>    MapGuideTest1._Default.Page_Load(Object sender, EventArgs e) in
> C:\Dokumente und Einstellungen\JMan\Eigene Dateien\Visual Studio
> 2005\Projects\MapGuideTest1\MapGuideTest1\Default.aspx.cs:32
>    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o,
> Object t, EventArgs e) +15
>    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
> EventArgs e) +34
>    System.Web.UI.Control.OnLoad(EventArgs e) +99
>    System.Web.UI.Control.LoadRecursive() +47
>    System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +106
> 
> Has anybody an idea what to do about it?
> 
> thanks, Johannes
> 
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Getting-started-using-Visual-Studio-2005-tf4008255s16610.html#a11387185
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list