Groups > Asp .Net > ASP dotNET Security > Re: How to secure/protect other file like .png, jpeg, kml in asp.net!




How to secure/protect other file like .png, jpeg, kml in
asp.net!

How to secure/protect other file like .png, jpeg, kml in asp.net!
Thu, 3 Apr 2008 03:06:07 +0000
i have configured restrict access rules for my folder "PICTURES". it
works well with .aspx file inside the folder. i have to login first be4 i can
view .aspx file. my problem now is when i access other file like .jpeg or .kml
file, i can automatically view the file without login page asking me for
username&password.  

for example when i type http://domainname/PICTURES/abc.aspx, i will redirect to
login page first. but when i try to access http://domainname/PICTURES/def.jpeg,
i just can view/download the file. 

how can i resolve this issue?. i dont want any other user that know the url can
simply type the url then can view my file. please help. tQ
Post Reply
Re: How to secure/protect other file like .png, jpeg, kml in asp.net!
Thu, 3 Apr 2008 03:41:26 +0000
One option is to add these extensions to IIS and map them to the same place that
aspx is mapped to.
 The other option would be to move them in a directory that is not accessible
from the web then using a ashx handler to server the image.
Post Reply
Re: How to secure/protect other file like .png, jpeg, kml in asp.net!
Thu, 3 Apr 2008 03:56:24 +0000
hmm, my other type of file like def.jpeg and abc.aspx is in the same folder
PICTURES. how to add the IIS extension for this folder?. all folders i already
put in wwwroot.

2nd option, how to use ashx handler to server the image?. not understand this,
please explain. tQ
Post Reply
about | contact