OK. I fixed the out-of-scope problem. Told you I was a newbie. Now I have the following problem:
I run the code below and am able to write sessionId to the page but the map does not display. Maybe there is something wrong with my frame tag or with the location of my web layout. I can't determine the problem. I can display the layout from Maestro and the url looks like this: http://localhost/mapguide/mapviewerajax/?WEBLAYOUT=Library%3a%2f%2flayouts%2fCid_Map_Basic.WebLayout the web page from my code looks like the attached image. This is my setup: Windows 7 64 bit vs 2010, compile any cpu, .net target 2.0 iis 7.5 Any suggestions? http://osgeo-org.1803224.n2.nabble.com/file/n5800284/Cid_Map.aspx.png <%@ Page Language="C#" debug="true" AutoEventWireup="true" CodeBehind="Cid_Map.aspx.cs" Inherits="Cid_Map.Cid_Map" %> <%@ Import Namespace="OSGeo.MapGuide" %> <script runat="server"> String webLayout = "Library://layouts/Cid_Map_Basic.WebLayout"; String defaultUser = "Anonymous"; String defaultPassword = ""; String sessionId = ""; </script> <% try { MapGuideApi.MgInitializeWebTier(@"C:\Program Files (x86)\OSGeo\MapGuide\Web\www\webconfig.ini"); MgUserInformation userinfo = new OSGeo.MapGuide.MgUserInformation(defaultUser, defaultPassword); MgSite site = new MgSite(); site.Open(userinfo); sessionId = site.CreateSession(); } catch (Exception e) { Response.Write(e.Message); } %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CID_Map</title> </head> <%Response.Write(sessionId); %> <frameset rows="0.*" border="0" framespacing="0"> <frame /> <frame src="/mapguide/mapviewernet/ajaxviewer.aspx?SESSION=<%= sessionId %>&WEBLAYOUT=<%= webLayout %>" name="ViewerFrame" /> </frameset> </html> -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/MGOS-2-2-Beta-with-net-Problems-tp5797915p5800284.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
