how can i forbidden user to visit a directory? MembershipProvider?
-
I have a directory 'UploadFiles' in my website, and I can forbidden users to visit via *.ASPX page. (check users right in *.aspx.cs), but i can not forbidden user to visit via directly input URL in browser. like http://localhost/mywebiste/uploadfiles.jpg I know the MembershipProvider in .NET Framework, but i think it too complex than i wanted. and i didn't find any document to help me write a good web.config file. so how can i solve it?
-
I have a directory 'UploadFiles' in my website, and I can forbidden users to visit via *.ASPX page. (check users right in *.aspx.cs), but i can not forbidden user to visit via directly input URL in browser. like http://localhost/mywebiste/uploadfiles.jpg I know the MembershipProvider in .NET Framework, but i think it too complex than i wanted. and i didn't find any document to help me write a good web.config file. so how can i solve it?
WuJunyin wrote:
so how can i solve it?
I prefer to write a HTTPHandler which handles JPG extension. Inside the handler, do user authorizations. If user is unauthorized, display relevant messages.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
WuJunyin wrote:
so how can i solve it?
I prefer to write a HTTPHandler which handles JPG extension. Inside the handler, do user authorizations. If user is unauthorized, display relevant messages.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions