Stash serving up web.config files when using IIS as a reverse proxy

I'm sure this is more of an IIS configuration issue, but I can't seem to find a solution.

I currently have Stash configured with IIS as a reverse proxy.  The problem I am experiencing is that if I try to look at the source of any web.config from a .Net project via stash, I receive a 404 error.

Due to the nature of web.config files I assume that there is a setting somewhere in IIS which prevents this sort of file being requested or returned as static content, but I can't seem to find a setting in IIS that would help resolve this issue.

Any suggestions or help would be greatly appreciated.

2 answers

1 accepted

3 votes
Answer accepted

I actually managed to find a solution to this issue.

Turns out that as suspected at a global level web.config files are filtered out by IIS.  This can be overridden on a site by site basis by adding the following to the sites web.config (in this case the base site that contains the reverse proxy configuration) 

         <remove segment="web.config" />


This article pointed me in the right direction:

Awesome! Thanks for sharing your solution.

Charles K I'm New Here Dec 17, 2018

Thanks, worked for me!

0 votes

Hi Chris,

Have you gone through ?


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables ROLLBAR_ACCESS_TOKEN...

186 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you