<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=IT link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Tried with </span><span lang=EN-US>MSVC2010 (Win32), got this exception:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal>00018093 13859.58398438 [7756] ##### Exception occurred ##### <o:p></o:p></p><p class=MsoNormal>00018094 13859.58398438 [7756] Tentativo di lettura o scrittura della memoria protetta. Spesso questa condizione indica che altre parti della memoria sono danneggiate. <o:p></o:p></p><p class=MsoNormal><span lang=EN-US>00018095 13859.58789063 [7756] mapscript_csharp <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>00018096 13859.58984375 [7756] in OSGeo.MapServer.mapscriptPINVOKE.mapObj_getProjection(HandleRef jarg1) <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>00018097 13859.58984375 [7756] in OSGeo.MapServer.mapObj.getProjection() <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif"'>Da:</span></b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif"'> Tamas Szekeres [mailto:szekerest@gmail.com] <br><b>Inviato:</b> martedì 4 ottobre 2011 20:17<br><b>A:</b> GMail<br><b>Cc:</b> Daniel Morissette; mapserver-dev@lists.osgeo.org<br><b>Oggetto:</b> Re: R: [mapserver-dev] Re: Problem with projectionObj<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>How did you obtain the binaries? I'd be curious to know whether the binaries from <a href="http://www.gisinternals.com/sdk/">http://www.gisinternals.com/sdk/</a> would work or not? <o:p></o:p></p><div><p class=MsoNormal>You might want to try using the MSVC2010 versions x86 or x64 depending on your OS platform/architecture.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Best regards,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Tamas<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>2011/10/4 GMail <<a href="mailto:itacasoft@gmail.com">itacasoft@gmail.com</a>><o:p></o:p></p><p class=MsoNormal>Yes, I think this is a permission issue, as most of IIS related problems ...<br>I also made another try:<br><br>I ported the previous code to a simple, simple console application. Well,<br>while the <a href="http://ASP.NET" target="_blank">ASP.NET</a> version fails both with IIS and with the VS2010 web<br>debugger, the console program works smoothly, producing all 10 image maps<br>and even filling the MS_ERRORFILE file with lots of stuff. Tried also with a<br>remote Windows 2008 Server, even there the web version does not work.<br>Here is the code:<br><br><br>///BEGIN<br><br>using System;<br>using System.Collections.Generic;<br>using System.Linq;<br>using System.Text;<br>using OSGeo.MapServer;<br>using System.IO;<br><br>namespace GenerateMap<br>{<br> class Program<br> {<br> const string MERCATORE_PROJ4 = "+proj=merc +a=6378137 +b=6378137<o:p></o:p></p><div><p class=MsoNormal>+lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null<o:p></o:p></p></div><p class=MsoNormal>+wktext +no_defs";<br> const string WGS84_PROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84<br>+no_defs";<br><br><br> static void DrawAMap(int index)<o:p></o:p></p><div><p class=MsoNormal> {<br> bool exists;<br> string filename =<o:p></o:p></p></div><p class=MsoNormal>@"C:\usr\lavoro\progetti\SilverlightMapServer\GisData\Demo\Terni\terni.map";<br><br> mapObj map = null;<br><br> try<br> {<br> map = new mapObj(filename);<br> }<br> catch (Exception ex)<br> {<br> string msg = ex.Message;<br> Console.WriteLine(msg);<br> }<br><br><br> int w = 800;<br> map.width = w;<br><br><br> int h = 600;<br> map.height = h;<br><br><br> rectObj bbox = new rectObj(12.6198865008904, 42.5498576637217,<br>12.6710248924462, 42.5784118606357, 0);<br><br><br> map.setProjection(MERCATORE_PROJ4);<br><br> projectionObj projMercatore = new<br>projectionObj(MERCATORE_PROJ4);<br> projectionObj projWGS84 = new projectionObj(WGS84_PROJ4);<br><br> try<br> {<br> ///HERE first time OK, second time hangs<br> bbox.project(projWGS84, projMercatore);<br> }<br> catch (Exception ex)<br> {<br> string msg = ex.Message;<br> Console.WriteLine(msg);<br> }<br><br> //map.extent = bbox;<br> map.setExtent(bbox.minx, bbox.miny, bbox.maxx, bbox.maxy);<o:p></o:p></p><div><p class=MsoNormal><br> imageObj image = map.draw();<br><br> MemoryStream memstrm = new MemoryStream(image.getBytes());<o:p></o:p></p></div><p class=MsoNormal> memstrm.Position = 0;<br><br> FileStream outStream = File.OpenWrite("mapimage" +<br>index.ToString() + ".png");<br> memstrm.WriteTo(outStream);<br> outStream.Flush();<br> outStream.Close();<br><br> bbox.Dispose();<br> projWGS84.Dispose();<br> projMercatore.Dispose();<br> image.Dispose();<br> map.Dispose();<br> }<br><br><br><br><br> static void Main(string[] args)<br> {<br> for (int i = 0; i < 10; i++)<br> {<br> DrawAMap(i);<br> }<br><br> }<br> }<br>}<br><br>///END<br><br><br>It seems there is a big problem with MapScript 6.0.1 (from MS4W) + <a href="http://ASP.NET" target="_blank">ASP.NET</a> +<br>IIS 7.0. Anybody has the same environment? Experiencing problems?<o:p></o:p></p><div><p class=MsoNormal><br><br><br>-----Messaggio originale-----<br>Da: <a href="mailto:mapserver-dev-bounces@lists.osgeo.org">mapserver-dev-bounces@lists.osgeo.org</a><br>[mailto:<a href="mailto:mapserver-dev-bounces@lists.osgeo.org">mapserver-dev-bounces@lists.osgeo.org</a>] Per conto di Daniel<br>Morissette<o:p></o:p></p></div><p class=MsoNormal>Inviato: martedì 4 ottobre 2011 17:42<br>A: <a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br>Oggetto: Re: R: [mapserver-dev] Re: Problem with projectionObj<o:p></o:p></p><div><div><p class=MsoNormal><br>On 11-10-04 11:37 AM, GMail wrote:<br>> Thanks for your answer.<br>> The first explanation is not possible, because the same code works for IIS<br>> 6.0, while it does not on IIS 7.0.<br>> The second is something I do not understand: using MapScript and <a href="http://ASP.NET" target="_blank">ASP.NET</a> I<br>> do not have a process "mapserv" that can crash ... but I understand that<br>if<br>> the IIS handler process crashes or hangs in some way, it may block the<br>> output buffer, and this is likely. But this does not explain why this<br>> happens only on IIS 7.0 and not on IIS 6.0. How can I have more log<br>> information?<br>><br><br>Maybe a permission issue? Sorry, I'm no IIS expert, just guessing...<br><br>Maybe try using MS_ERRORFILE "windowsdebug" with tools such as DebugView<br>and see if that makes any difference?<br><br><a href="http://mapserver.org/optimization/debugging.html#step-1-set-the-ms-errorfile -variable" target="_blank">http://mapserver.org/optimization/debugging.html#step-1-set-the-ms-errorfile<br>-variable</a><br><br><br>--<br>Daniel Morissette<br><a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>Provider of Professional MapServer Support since 2000<br><br>_______________________________________________<br>mapserver-dev mailing list<br><a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br><br>_______________________________________________<br>mapserver-dev mailing list<br><a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>