How to encode encoded characters without escaping them ? ^_^
When you try to add a module mapping for perl, it is supposed to be configured like this in IIS :
Request Path : *.pl
Executable : C:Perlinperl.exe « %s » %s
This declaration looks like this in IIS config files (web.config or machine.config) :
<handlers>
<add name="Perl" path="*.pl" verb="GET,HEAD,POST" modules="CgiModule" scriptProcessor="E:Perl64Perl64inperl.exe "%s" %s" />
</handlers>
The double-quotes that surrounds %s are encoded with XML encoding.
But when you use appcmd command to declare this module mapping, it is a bit more tricky, because you cannot use the special character &. Furthermore, the presence of spaces into the « scriptProcessor » attribute force you to surround the whole expression with double-quotes…
So, this is the appcmd command :
appcmd.exe set config /section:handlers /"+[name='Perl',paverb='GET,HEAD,POST',modules='CgiModule',scriptProcessor='E:Perl64Perl64inperl.exe %u0022%s%u0022 %s']"
Étiquette : Appcmd
IIS 7 : Import – Export d'un site
C’était trop simple sous IIS 6…
Pour exporter un site :
C:WindowsSystem32inetsrvappcmd list site /name:SITENAME /config /xml > OUTPUT.xml
Pour importer un site :
appcmd add sites /in < OUTPUT.xml
Attention à bien éditer le fichier XML et modifier certains informations relatives au serveur cible (IP, Site ID…)
Source