[mapguide-users] Guide Me in MGOS 2.1

Kenneth Skovhede ks at geograf.dk
Sat Jan 30 14:00:06 EST 2010


I'm guessing that your VS project references the old dll.
Each time you rebuild, it will replace the current dll.

If your problem is that the dll is not being loaded,
it is because you need to rebuild your application,
referencing the new dll.

Easiest way to fix it, is to open the VS solution,
remove the MapGuideDotNetApi.dll and add it again.
Then rebuild. Verify that the re-added dll has version 1.0.0.1.

If you cannot rebuild the solution for some reason,
you need to do a assembly redirect in the web.config.
A bit advanced, but there is documentation on MSDN.

Regards, Kenneth Skovhede, GEOGRAF A/S



padmini godavarthi skrev:
> Hi 
> iam using MGOS 2.1 with Mapguide Maestro 1.0.9 on iis 6.0
> Microsoft visual studio 2008 Expression edition on windows xp service pack2
>
> by clicking on show in browser in maestro the map appears fine on Browser
> ....
>
> i found the error that while developing a sample application,
> MapGuideDotNetApi.dll of assembly version 2.0.0.2308 is appeared in my
> application so, i deleted it on my application and placed 
> MapGuideDotNetApi.dll of assembly version 1.0.0.1 in my application as told
> by kenneth in 
>
>  
> http://n2.nabble.com/MapGuide-2-1-Ok-in-Studio-error-Message-in-IE-Impossible-to-Get-Entry-Point-td3080482.html#a3082009
>
> but after running the application the MapGuideDotNetApi.dll of assembly
> version 2.0.0.2308 is again  appears in my application
>
>
> my code is as follows 
>
>  
>       Imports OSGeo.MapGuide
>       Imports OSGeo.MapGuide.MaestroAPI
>       Imports System.Web.UI.HtmlControls
>       Imports System.Collections.Specialized.NameValueCollection
>
>
> (Main.aspx.vb)
> Partial Class _Default
>     Inherits System.Web.UI.Page
>     Public sessionId As String
>     Public webLayout As String
>     Dim resrce As ResourceIdentifier
>     Public layout As WebLayout
>     Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Me.Load
>         Dim realPath As String =
> Request.ServerVariables("APPL_PHYSICAL_PATH")
>         Dim configPath As String = realPath + "webconfig.ini"
>         MapGuideApi.MgInitializeWebTier(configPath)
>         Dim userinfo As MgUserInformation = New
> MgUserInformation("Administrator", "admin")
>         'Dim mgsiteconn As MgSiteConnection = New MgSiteConnection()
>         Dim site As MgSite = New MgSite()
>         site.Open(userinfo)
>         sessionId = site.CreateSession()
>         Dim host As Uri = New
> Uri("http://localhost/mapguide/mapagent/mapagent.fcgi")
>         Dim conn As HttpServerConnection = New HttpServerConnection(host,
> "Administrator", "admin", "en", True)
>         layout = conn.GetWebLayout("Library://sample/Layout.WebLayout")
>         resrce = New ResourceIdentifier("sample", ResourceTypes.WebLayout,
> sessionId)
>         conn.SaveResourceAs(layout, resrce)
>         HttpContext.Current.Session("sid") = sessionId
>         HttpContext.Current.Session("layout") = resrce
>     End Sub
> End Class
>
> and the (main.aspx)
>
>   <body>
>     <form id="form1" runat="server">
>     <div>
>     <iframe id="titleframe"  runat="server" frameborder="1"  visible="true"
> src="title.html">
>     </iframe>
>  </div>
>    
>      <iframe id="I1"
> src="../mapviewernet/ajaxviewer.aspx?SESSION=<%=sessionId%>&WEBLAYOUT=<%=layout%>"
>   
>     
>     </iframe>
>    
>     </form>
> </body>
>
> can u plz tell me the solution
>
>
> and my doubts are
>
> 1) is mgos 2.1 supports the environment of  MS VS 2008 Expression Edition?
> (because in iis i configured the mapguide to .net framework 2.0 only)
>
>
> Regards, 
> Padmini G. 
>
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20100130/a6e0842e/attachment.html


More information about the mapguide-users mailing list