wtbonnell Posted November 30, 2004 Posted November 30, 2004 Problem: I have an .xml file that users can read and write through code (C#.Net), however, I do not want them being able to view the .xml file when they type it in the URL field of the web browser. Solution: I researched a possible way of solving this by using the httpHandlers. In the web.config file I would put the following: <httpHandlers> <add verb="*" path="*.xml"type="YourNamespace.YourHttpHandler"/> </httpHandlers> Then I am suppose to write a new IHttpHandler class that will write a 404 error when a user tries to access the .xml file virtually (but I am unsure how to write this class...are there any good examlpes out there or has someone done this already that may be able to fill in the empty gaps?) Thanks for your help... Quote
Administrators PlausiblyDamp Posted November 30, 2004 Administrators Posted November 30, 2004 Could you not just use instead of creating your own? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.