Link to home
Create AccountLog in
Avatar of ma701sss
ma701sss

asked on

XML file

I have an xml file that I use as a very simple database. How can I prevent access to it, as at the moment I have it sitting in a directory that users can browse to? I want to be able to look up values in the xml file, within the aspx pages, but I don't want anyone to be able to download or view the xml file.
ASKER CERTIFIED SOLUTION
Avatar of soumya_parida
soumya_parida
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of ma701sss
ma701sss

ASKER

and the link should be /App_data/file.xml for example?
You mean in the code? Yes "App_Data/file.xml"
was this resolved?
Yes, great thanks. I just tested it and it works. It gives this error when I try to browse directly:

HTTP Error 404.8 - Not Found
Description: The request filtering module is configured to deny a path in the URL that contains a hiddenSegment section.