[mapguide-users] Re: Configuration Error in MapviewerNet in MGOS 2.1
padmini godavarthi
godavarthi.padmini at gmail.com
Tue Feb 2 22:52:59 EST 2010
Hi kenneth,
Thanks for your reply.i have passed the input parameters to the
ajaxviewer.aspx .but is shows the result as
invalid repository type
invalid repository type
in browser . just see my code
Public sessionId As String
Public webLayout As String
Dim resrce As ResourceIdentifier
Public layout As WebLayout
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
and in source file(default.aspx)
<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>
is any thing wrong in my code??
Regards,
Padmini G.
--
View this message in context: http://n2.nabble.com/Configuration-Error-in-MapviewerNet-in-MGOS-2-1-tp4499038p4505422.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list