<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>&nbsp;</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>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</o:p></p><p class=MsoNormal>How did you obtain the binaries? I'd be curious to know whether the binaries from&nbsp;<a href="http://www.gisinternals.com/sdk/">http://www.gisinternals.com/sdk/</a>&nbsp;would work or not?&nbsp;<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>&nbsp;</o:p></p></div><div><p class=MsoNormal>Best regards,<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Tamas<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>2011/10/4 GMail &lt;<a href="mailto:itacasoft@gmail.com">itacasoft@gmail.com</a>&gt;<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>&nbsp; &nbsp;class Program<br>&nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp;const string MERCATORE_PROJ4 = &quot;+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 &nbsp;+no_defs&quot;;<br>&nbsp; &nbsp; &nbsp; &nbsp;const string WGS84_PROJ4 = &quot;+proj=longlat +ellps=WGS84 +datum=WGS84<br>+no_defs&quot;;<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp;static void DrawAMap(int index)<o:p></o:p></p><div><p class=MsoNormal>&nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bool exists;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string filename =<o:p></o:p></p></div><p class=MsoNormal>@&quot;C:\usr\lavoro\progetti\SilverlightMapServer\GisData\Demo\Terni\terni.map&quot;;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mapObj map = null;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map = new mapObj(filename);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;catch (Exception ex)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string msg = ex.Message;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.WriteLine(msg);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int w = 800;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.width = w;<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int h = 600;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.height = h;<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rectObj bbox = new rectObj(12.6198865008904, 42.5498576637217,<br>12.6710248924462, 42.5784118606357, 0);<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.setProjection(MERCATORE_PROJ4);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;projectionObj projMercatore = new<br>projectionObj(MERCATORE_PROJ4);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;projectionObj projWGS84 = new projectionObj(WGS84_PROJ4);<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;try<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;///HERE first time OK, second time hangs<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bbox.project(projWGS84, projMercatore);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;catch (Exception ex)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string msg = ex.Message;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.WriteLine(msg);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//map.extent = bbox;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.setExtent(bbox.minx, bbox.miny, bbox.maxx, bbox.maxy);<o:p></o:p></p><div><p class=MsoNormal><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;imageObj image = map.draw();<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MemoryStream memstrm = new MemoryStream(image.getBytes());<o:p></o:p></p></div><p class=MsoNormal>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;memstrm.Position = 0;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FileStream outStream = File.OpenWrite(&quot;mapimage&quot; +<br>index.ToString() + &quot;.png&quot;);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;memstrm.WriteTo(outStream);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;outStream.Flush();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;outStream.Close();<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bbox.Dispose();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;projWGS84.Dispose();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;projMercatore.Dispose();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;image.Dispose();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.Dispose();<br>&nbsp; &nbsp; &nbsp; &nbsp;}<br><br><br><br><br>&nbsp; &nbsp; &nbsp; &nbsp;static void Main(string[] args)<br>&nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (int i = 0; i &lt; 10; i++)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DrawAMap(i);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br>&nbsp; &nbsp; &nbsp; &nbsp;}<br>&nbsp; &nbsp;}<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>&gt; Thanks for your answer.<br>&gt; The first explanation is not possible, because the same code works for IIS<br>&gt; 6.0, while it does not on IIS 7.0.<br>&gt; The second is something I do not understand: using MapScript and <a href="http://ASP.NET" target="_blank">ASP.NET</a> I<br>&gt; do not have a process &quot;mapserv&quot; that can crash ... but I understand that<br>if<br>&gt; the IIS handler process crashes or hangs in some way, it may block the<br>&gt; output buffer, and this is likely. But this does not explain why this<br>&gt; happens only on IIS 7.0 and not on IIS 6.0. How can I have more log<br>&gt; information?<br>&gt;<br><br>Maybe a permission issue? Sorry, I'm no IIS expert, just guessing...<br><br>Maybe try using MS_ERRORFILE &quot;windowsdebug&quot; 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&#13;&#10;-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>&nbsp;</o:p></p></div></div></body></html>