Put the file in your own directory and release the web.config file, which has an authorization configuration for this directory that requires Windows authentication
You cannot mix authentication providers for a single application. So, for example, you cannot have forms authentication for ~ / and Windows authentication for ~ / Secure. You can work around this by making ~ / Secure another application in IIS, but this greatly complicates the deployment and testing of IMO.
I ran into this problem while trying to protect ASMX services with basic authentication from a domain, but being in the same application as forms authenticated pages. I ended up hacking the main auth task in the ASMX service itself to request credentials.
source share