How to prevent anonymous users from accessing a file using forms authentication?
问题 We are using forms authentication to authenticate users. In our application there is a page to download an exe. When I am debugging the code in visual studio, it allows only logged-in users to download the file. When other users try to download the file, they are automatically redirected to the login page. But when I am running this from a virtual directory, all users (whether logged-in or not) can download the file by accessing the direct path like http://testappln/foldername/test.exe . How