This is due to an IIS security configuration which blocks access to \bin folders and specific extensions. This can cause problems when adding additional files to distribution packages because the spicific filetypes/folders are blocked by IIS.
This example shows how to allow to \bin folders and .java extensions.
There are two options to address this problem, you must make some IIS configuration changes manually to the web.config file that should be located in the package share and the applicationHost.config file located in \Windows\System32\inetsrv\config.
Add the following changes in red to the web.config:
<?xml version="1.0" encoding="UTF-8"?>
<defaultDocument enabled="false" />
<directoryBrowse enabled="true" />
<remove segment="bin" />
Performing this change in the web.config file allows you to only affect this HTTP share.
Make the following change to the applicationHost.config file to allow the .java extension to be used when parsing the file system to add the additional file:
Location of ApplicationHost.config file: C:\Windows\System32\inetsrv\config
- Open the file in notepad.
- Search for “<requestFiltering>”
- Below the “<fileExtensions allowUnlisted="true" applyToWebDAV="true">” section find “<add fileExtension=".java" allowed="false" />”.
- Change false to “true”
- Save your changes
- Perform an IISreset (From the command prompt type "IISRESET" and press enter). This will stop and restart the IIS services and load the new configuration.
Using the IIS Manager GUI:
- Select your http share under the Default Web Site and make sure the feature view is selected.
- Under the IIS section, double click on “Request Filtering”.
- You should now see various different rules, select the tab called “Hidden Segments”.
- In the list that’s now displayed select “bin” and click on “remove” under the Actions column on the right.
- Now click on the “File Name Extensions” tab and select “.java”. (it should display “false” in the Allowed column)
- Right click on .java and select remove.
- Under the Action column on the right, click Allow File Name Extension…
- In the dialog box that appears type “java” without the period and click OK.
- Perform an IISreset. (From the command prompt type "IISRESET" and press enter). This will stop and restart the IIS services and load the new configuration.