[mapguide-users] Getting started using Visual Studio 2005
Johannes Elsinghorst
JohannesElsinghorst at gmx.net
Sun Jul 1 12:08:22 EDT 2007
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
More information about the mapguide-users
mailing list