<!DOCTYPE html><html><head><title></title><style type="text/css">#qt p.qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;font-size:11pt;font-family:"Aptos", sans-serif;}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Tim,<br></div><div><br></div><div><div>From <a href="https://mapserver.org/installation/iis.html#troubleshooting">https://mapserver.org/installation/iis.html#troubleshooting</a><br></div><div><br></div><div>The following error is returned (from MapServer 8.0) if <code style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204, 204, 204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204, 204, 204);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(246, 246, 246);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;font-family:menlo, consolas, monospace;font-size:90%;padding-top:1px;padding-right:3px;padding-bottom:1px;padding-left:3px;">allowPathInfo="false"</code> is set in the <code style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204, 204, 204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204, 204, 204);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(246, 246, 246);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;font-family:menlo, consolas, monospace;font-size:90%;padding-top:1px;padding-right:3px;padding-bottom:1px;padding-left:3px;">handlers</code> section
for MapServer in the <code style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204, 204, 204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204, 204, 204);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(246, 246, 246);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;font-family:menlo, consolas, monospace;font-size:90%;padding-top:1px;padding-right:3px;padding-bottom:1px;padding-left:3px;">web.config</code> file. This should be set to <code style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(204, 204, 204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204, 204, 204);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204, 204, 204);border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;background-color:rgb(246, 246, 246);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;font-family:menlo, consolas, monospace;font-size:90%;padding-top:1px;padding-right:3px;padding-bottom:1px;padding-left:3px;">true</code>:<br></div><div><br></div><div> msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed.<br></div><div><br></div></div><div>You could also try the following in your CONFIG file. Note you'll need to restart IIS to pick up any changes. Also try adding some broken syntax (e.g. CONFIGX) to check the file is being picked up. <br></div><div><br></div><div>CONFIG<br></div><div> ENV<br style="max-width:100%;height:auto;"></div><div> MS_MAP_PATTERN "."<br></div><div><br></div><div><br></div><div>Seth<br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><br></div><div class="signature">mastodon: @<a href="mailto:geographika@mastodon.social">geographika@mastodon.social</a><br></div></div><div><br></div><div>On Fri, Feb 7, 2025, at 3:25 PM, Pascoe, Tim (ECCC) via MapServer-users wrote:<br></div><blockquote type="cite" id="qt" style="overflow-wrap:break-word;"><div class="qt-WordSection1"><p class="qt-MsoNormal">I’m working on porting a development environment to our production server. Using:<br></p><p class="qt-MsoNormal"> <br></p><p class="qt-MsoNormal">Mapserver 8.2.2 binaries from GISInternals<br></p><p class="qt-MsoNormal">IIS 10<br></p><p class="qt-MsoNormal">Windows Server 2016<br></p><p class="qt-MsoNormal"> <br></p><p class="qt-MsoNormal">The permissions are the same on both servers, I have Mapserver set up as a FastCGI module and have the MAPSERVER_CONFIG_FILE Env variable set. I’ve attached the Config file here, but it’s pretty simple, and I can confirm it’s being read.<br></p><p class="qt-MsoNormal"> <br></p><p class="qt-MsoNormal">The error I’m getting is: msLoadMap(): Regular expression error. Filename validation failed<br></p><p class="qt-MsoNormal"> <br></p><p class="qt-MsoNormal">I’ve googled this, and only found one other user who seemed to have a similar problem. They never posted a clear solution, and their workaround was to point to the endpoint with no mapserv.exe in the path (just the endpoint), but had no
idea why this worked. It did not work for me, however. What is confusing is that I have no validation for the files. I have a MAPS key set, which works on Development, and have set the MS_MAP_PATTERN to *.* to try and eliminate any validation mistakes. The
map files are ones that have been in use for some time, with no issues. Hitting just the raw endpoint delivers the expected ‘QUERY_STRING is set, but empty. ’but still also includes the Filename validation error.<br></p><p class="qt-MsoNormal"> <br></p><p class="qt-MsoNormal">Am I missing a PATH environment variable that is required?<br></p><p class="qt-MsoNormal">Anyone have any ideas for me to test out?<br></p><p class="qt-MsoNormal"> <br></p><p class="qt-MsoNormal"><b><span lang="EN-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Trebuchet MS", sans-serif;">Timothy Pascoe</span></span></b><b><span lang="EN-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Trebuchet MS", sans-serif;"><span class="size" style="font-size:12pt;"></span></span></span></b><br></p><p class="qt-MsoNormal"><span lang="EN-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Trebuchet MS", sans-serif;"><span class="size" style="font-size:9pt;"> </span></span></span><br></p><p class="qt-MsoNormal"><span lang="EN-CA" style="color:red;"><span class="font" style="font-family:"Trebuchet MS", sans-serif;"><span class="size" style="font-size:9pt;">Please note the return to our departmental E-mail address below. My Canada.ca address will also continue to work for the time being/Veuillez noter
le retour à notre adresse électronique départementale ci-dessous. </span></span></span><span lang="FR-CA" style="color:red;"><span class="font" style="font-family:"Trebuchet MS", sans-serif;"><span class="size" style="font-size:9pt;">Mon adresse Canada.ca continuera également à fonctionner pour le moment.</span></span></span><br></p><p class="qt-MsoNormal"><span lang="FR-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Trebuchet MS", sans-serif;"><span class="size" style="font-size:9pt;"> </span></span></span><br></p><p class="qt-MsoNormal"><span lang="FR-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Trebuchet MS", sans-serif;"><span class="size" style="font-size:9pt;">Environmental Scientist, Water Quality Monitoring & Surveillance<br> Environment & Climate Change Canada (ECCC)</span></span></span></p><p class="qt-MsoNormal"><span lang="EN-CA" style="color:black;"><span class="font" style="font-family:"Verdana", sans-serif;"><span class="size" style="font-size:10pt;"><a href="mailto:tim.pascoe@ec.gc.ca"><span lang="FR-CA" style="color:blue;">tim.pascoe@ec.gc.ca</span></a></span></span></span><span lang="EN-CA" style="color:black;"><span class="font" style="font-family:"Verdana", sans-serif;"><span class="size" style="font-size:10pt;"> </span></span></span><span lang="FR-CA" style="color:black;"><span class="font" style="font-family:"Verdana", sans-serif;"><span class="size" style="font-size:10pt;">T: 905-336-6239 / C: 289-253-7857</span></span></span><br></p><p class="qt-MsoNormal"><span lang="FR-CA" style="color:black;"><span class="font" style="font-family:"Verdana", sans-serif;"><span class="size" style="font-size:10pt;"> </span></span></span><br></p><p class="qt-MsoNormal"><span lang="FR-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Trebuchet MS", sans-serif;"><span class="size" style="font-size:9pt;">Scientifique de l’environement, Surveillance de la qualité de l'eau</span></span></span><span lang="FR-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Calibri", sans-serif;"></span></span><br></p><p class="qt-MsoNormal"><span lang="FR-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Trebuchet MS", sans-serif;"><span class="size" style="font-size:9pt;">Environnement et Changement climatique Canada (ECCC)</span></span></span><br></p><p class="qt-MsoNormal"><span lang="EN-CA" style="color:black;"><span class="font" style="font-family:"Verdana", sans-serif;"><span class="size" style="font-size:10pt;"><a href="mailto:tim.pascoe@ec.gc.ca"><span lang="FR-CA" style="color:blue;">tim.pascoe@ec.gc.ca</span></a></span></span></span><span lang="EN-CA" style="color:black;"><span class="font" style="font-family:"Verdana", sans-serif;"><span class="size" style="font-size:10pt;"> </span></span></span><span lang="FR-CA" style="color:black;"><span class="font" style="font-family:"Verdana", sans-serif;"><span class="size" style="font-size:10pt;">T: 905-336-6239 / C: 289-253-7857</span></span></span><br></p><p class="qt-MsoNormal"><span lang="FR-CA" style="color:black;"><span class="font" style="font-family:"Verdana", sans-serif;"><span class="size" style="font-size:10pt;"> </span></span></span><br></p><p class="qt-MsoNormal"><span lang="EN-CA" style="color:black;"><img border="0" width="372" height="20" style="width:3.875in;height:0.2083in;" id="qt-Picture_x0020_1" src="cid:image001.gif@01DB7942.3A866410" alt="Environment Canada"></span><span lang="EN-CA" style="color:rgb(31, 73, 125);"><span class="font" style="font-family:"Calibri", sans-serif;"></span></span><br></p><p class="qt-MsoNormal"> <br></p></div><div>_______________________________________________<br></div><div>MapServer-users mailing list<br></div><div><a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div><br></div><div><br></div><div><b>Attachments:</b><br></div><ul><li>mapserver.conf<br></li></ul></blockquote><div><br></div></body></html>