You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add multiple file extensions to the allowed list for request filtering using the xWebConfigPropertyCollection resource but am stuck on exactly how to do it. I can add an individual extension, but can't figure out how to indicate multiples. Below adds one extension with the whole string. If I remove the ", .aspz" then it successfully adds the .aspx extension.
Using the above configuration would result in this configuration <add fileExtension=".aspx, .aspz" />. This will mean that a file should be named like index.aspx, .aspz, which is not what you want to achieve. Instead you could loop over the extensions that you would like to allow and add all of them. That could look something like
I am trying to add multiple file extensions to the allowed list for request filtering using the xWebConfigPropertyCollection resource but am stuck on exactly how to do it. I can add an individual extension, but can't figure out how to indicate multiples. Below adds one extension with the whole string. If I remove the ", .aspz" then it successfully adds the .aspx extension.
WebsitePath = 'MACHINE/WEBROOT/APPHOST'
Filter = 'system.webServer/security/requestFiltering'
CollectionName = 'fileExtensions'
ItemName = 'add'
ItemKeyName = 'fileExtension'
ItemKeyValue = '.aspx, .aspz'
ItemPropertyName = 'allowed'
ItemPropertyValue = 'true'
Ensure = 'Present'
The text was updated successfully, but these errors were encountered: