Artifact dependency returns 404 when downloading artifacts
I have two builds with a dependency: build 1 produces a generic tool, to be used by build 2:
Build 1 produces bunch of binaries to:
`Artifacts/MyToolName/Console/`
Build 2 uses (tries to use) these binaries, by adding a snapshot depency
`Artifacts/MyToolName/Console/** => MyToolName`

However, when running the build, or checking the dependency, I get:
Failed to download [http://myservername/httpAuth/repository/download/Project_1/39743.tcbuildid/Artifacts/MyToolName/Console/binary1.dll]: java.io.IOException: Illegal status [404] while downloading http://myservername/httpAuth/repository/download/Project_1/39743.tcbuildid/Artifacts/MyToolName/Console/binary1.dll: Not Found (jetbrains.buildServer.artifacts.impl.SourcePathAwareResolvingFailedException)
Of course the above mentioned project names are fictional. These are the true paths and error messages:
```
[09:18:12]: Dependency resolving started...
[09:18:12]: Downloading artifacts from: http://teamcity
[09:18:12]: Downloading 240 artifacts from <CS / CS Library / Core / Develop [feature/cs-507_correct_schema_authorization], build #511 [id 39743]>
[09:18:13]: Failed to download artifact dependency <CS / CS Library / Core / Develop [feature/cs-507_correct_schema_authorization], build #511 [id 39743]>: Failed to download file 'Artifacts/UpgradeEngine/Console/win-x64/CS.Lib.UpgradeEngine.DAL.dll.config': Failed to download [http://teamcity/httpAuth/repository/download/CsLibrary_Core_Dev/39743.tcbuildid/Artifacts/UpgradeEngine/Console/win-x64/CS.Lib.UpgradeEngine.DAL.dll.config]: java.io.IOException: Illegal status [404] while downloading http://teamcity/httpAuth/repository/download/CsLibrary_Core_Dev/39743.tcbuildid/Artifacts/UpgradeEngine/Console/win-x64/CS.Lib.UpgradeEngine.DAL.dll.config: Not Found (jetbrains.buildServer.artifacts.impl.SourcePathAwareResolvingFailedException)
[09:18:13]: Failed to resolve 1 dependencies
[09:18:13]: Dependency resolving finished with errors
```
Things to note:
- we are running Teamcity Enterprise 2019.1.5 (build 66605)
- we are running Teamcity on Windows
- our Teamcity instance runs at http://teamcity
Please sign in to leave a comment.
Turns out we run Teamcity behind a IIS reverse proxy.
IIS by default forbids serving some file types, like `.config`, as this can be part of IIS website or .Net application configuration.
By removing this constraint, dependencies work fine!