Video Screencast Help
New Company Name and Logo Announced. Learn More.

appcmd help

Created: 18 Jan 2013 • Updated: 22 Jan 2013 | 4 comments
This issue has been solved. See solution.

Does anyoyone know how to target the package server (PS) virtual directory and not just the "Default Web Site' request filter section?  Here is a script I'm using: 

appcmd set config /section:system.webServer/security/requestFiltering -fileExtensions.[fileExtension='.cer'].allowed:true

The script runs fine and targets the "Default Web Site" request filter section to allow a .cer extension (this is embedded into one of our applications and it getting blocked).  However, what I want to do is not target the default web site but to drill down under that and target the request filters only for the PS virtual page (default web site>Altiris>PS ----request filters).

Any help would be appreciated!

Discussion Filed Under:

Comments 4 CommentsJump to latest comment

mclemson's picture

http://technet.microsoft.com/en-us/library/cc732107(v=ws.10).aspx

Something like:
appcmd set config "Default Web Site\Altiris\PackageShare" /section:system.webServer/security/requestFiltering -fileExtensions.[fileExtension='.cer'].allowed:true

The specific site/directory is placed in "quotes" after config and before your switches.  I haven't tested this as I've only had to do this manually for a small number of sites.

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com

rweiss77's picture

Yeah, I've poured over the technet articles and tried your above syntax, even changing the syntax for ITMS to "PS" from "package share" and no luck.... I get errors saying it cannot find the site object with identifier "ERROR ( message:Cannot find SITE object with identifier "Default Web Site\Altiri
s\PS". )
 

Or I get this error with the command you provided me:

ERROR ( message:Cannot find SITE object with identifier "Default Web Site\Altiri
s\PackageShare". )
 

That's the problem I've been running into... getting the filtering to work with the targeted virtual page and correct syntax....

rweiss77's picture

Well, I changed the syntax around a bit to use forward slashes instead of back slashes, I'm getting closer but now getting this error:

C:\Windows\System32\inetsrv>appcmd set config "Default Web Site/Altiris/PS" /sec
tion:system.webServer/security/requestFiltering -fileExtensions.[fileExtension='
.cer'].allowed:true

ERROR ( message:Cannot find requested collection element. )

rweiss77's picture

Got it working... and hidden segments as well.

example:  appcmd set config "Default Web Site/Altiris" /section:requestfiltering /-fileExtensions.[fileextension='.browser']

SOLUTION