xml newbie help needed!!!

  • Thread starter Thread starter Benny
  • Start date Start date
B

Benny

hello all,

i just wrote a guestbook web application using asp.net with c#, and uses
a xml file as the database, and a xslt for displaying the xml data. when
i typed http://localhost/guestbook/guestbook.xml or guestbook.xslt, im
able to see the file contents. unlike a .cs or .config files, they are
explicitly forbidden.
im new in xml, can someone tell me how can i stop people viewing
xml/xslts file contents like the .cs/.config files? or any related
article will be great.

thank you in advanced,

benny
 
Benny,

try and look up <httpHandlers> in MSDN library. you can also look at the
entries in your machine.config and see the httpHandlers section.

cheers,
Jonel
 
One thing you might be able to do is write a aspx file which uses SAX
or DOM to compiles the files within the aspx file, and spit out true
html. possibly look at moving the xml/xsl files into a protected
directory.

I'm kinda a newb too, but i have tried this and it works just fine
(using SAX within a aspx file).
 
Back
Top