Ticket #675 (closed defect: fixed)
HttpServerConnection.RenderRuntimeMap() fails...
| Reported by: | MaksimS | Owned by: | ksgeograf |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Maestro | Version: | |
| Severity: | major | Keywords: | |
| Cc: | External ID: |
Description
While trying to get rendered map using:
Dim host As New Uri("http://server/mapguide2009/mapagent/mapagent.fcgi")
Dim conn As New HttpServerConnection(host, "Administrator", "password", "en", True)
Dim mapId As String = conn.GetResourceIdentifier("Folder/SubFolder/PLAN", ResourceTypes.MapDefinition, False)
Dim mapDef As MapDefinition = conn.GetMapDefinition(mapId)
Dim mapName As String = conn.GetResourceName(mapId, False)
Dim rtMapId As String = "Session:" + conn.SessionID + "//" + mapName + ".Map"
conn.CreateRuntimeMap(rtMapId, mapDef)
Dim rtMap As RuntimeClasses.RuntimeMap = conn.GetRuntimeMap(rtMapId)
Dim stream As System.IO.MemoryStream = conn.RenderRuntimeMap(rtMapId, 6259416.4634, 4320081.3816, 10000, 400, 400, 75)
Here, on conn.RenderRuntimeMap? (last line) it throws following exception:
System.Net.WebException was unhandled by user code
Message="The request was aborted: The request was canceled."
Source="System"
StackTrace:
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting) at System.Net.ConnectStream.System.Net.ICloseEx.CloseEx(CloseExState closeState) at System.Net.ConnectStream.Dispose(Boolean disposing) at System.IO.Stream.Close() at System.IO.Stream.Dispose() at OSGeo.MapGuide.MaestroAPI.HttpServerConnection.RenderRuntimeMap(String resourceId, Double x, Double y, Double scale, Int32 width, Int32 height, Int32 dpi) at Predmet.SetMapGuide() in D:\DEV\Legalizacija\Predmet.aspx.vb:line 285 at Predmet.Initialize() in D:\DEV\Legalizacija\Predmet.aspx.vb:line 147 at Predmet.Page_Load(Object sender, EventArgs e) in D:\DEV\Legalizacija\Predmet.aspx.vb:line 44 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: System.IO.IOException
Message="Cannot close stream until all bytes are written."
Source="System"
StackTrace:
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting)
InnerException:
...instead of returning rendered Stream.
Change History
Note: See
TracTickets for help on using
tickets.
