Files in certain folder cannot be downloaded

After the application files are deployed to the IIS server, files in certain folder (for example "bin" folder) cannot be downloaded successfully.

Cause

IIS will make certain folders inaccessible to users. These folders are configured in the <hiddenSegments> element. For more information, refer to https://learn.microsoft.com/iis/configuration/system.webServer/security/requestFiltering/hiddenSegments/.


Solution:

You can consider the following workarounds:

#1: Rename the folder. For example, change the "bin" folder to a different folder name.


#2: Add the folder under the "Files preloaded as compressed packages" group (instead of the "Files preloaded in uncompressed format" group) in the PowerServer project’s External files list.


#3: Configure IIS to allow access to the folder.

Detailed steps: open the IIS manager, navigate to the corresponding web site > [appname] folder, double click the Request Filtering module and select the Hidden Segments tab, and then remove the folder (for example, "bin") from the list.