Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 08, 2013 10:34 AM by ahmedilyas
Jan 06, 2013 11:11 PM|LINK
I am using Form authentication on ASP.NET 4.0 and need to know how it is possible to disable access to all areas of the website (folders/files) except for specific files, such as files in css folder?
only if the user is authenticated, can they access those files.
Jan 06, 2013 11:23 PM|LINK
Realised it does not work with txt files which is ok (since I was using that as a test) but for most other files it works.
you can also do it this way:
Jan 08, 2013 10:24 AM|LINK
I think you can try creating a custome HTTP handler for .txt file and add the custom mapping in the app's web.config.
Jan 08, 2013 10:34 AM|LINK
yes you are correct in relation to making a customer HTTP Handler however this would be a little overkill for this scenario :)
But yes, you are also correct!