How did you obtain the binaries? I&#39;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? <div>You might want to try using the MSVC2010 versions x86 or x64 depending on your OS platform/architecture.</div>
<div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br></div><div><br><br><div class="gmail_quote">2011/10/4 GMail <span dir="ltr">&lt;<a href="mailto:itacasoft@gmail.com">itacasoft@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">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 = &quot;+proj=merc +a=6378137 +b=6378137<br>
<div class="im">+lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null<br>
</div>+wktext  +no_defs&quot;;<br>
        const string WGS84_PROJ4 = &quot;+proj=longlat +ellps=WGS84 +datum=WGS84<br>
+no_defs&quot;;<br>
<br>
<br>
        static void DrawAMap(int index)<br>
<div class="im">        {<br>
            bool exists;<br>
            string filename =<br>
</div>@&quot;C:\usr\lavoro\progetti\SilverlightMapServer\GisData\Demo\Terni\terni.map&quot;;<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);<br>
<div class="im"><br>
            imageObj image = map.draw();<br>
<br>
            MemoryStream memstrm = new MemoryStream(image.getBytes());<br>
</div>            memstrm.Position = 0;<br>
<br>
            FileStream outStream = File.OpenWrite(&quot;mapimage&quot; +<br>
index.ToString() + &quot;.png&quot;);<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 &lt; 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?<br>
<div class="im"><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<br>
</div>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<br>
<div><div></div><div class="h5"><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&#39;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
-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><br>
</div></div></blockquote></div><br></div>