File Download Permission Control (ASP.NET) Repost: Andy.M Date: 2004-03-04 Popularity: 55 Things to show the website, the report is stored in the server, the person who wants to log in or some authority Can you download the Excel report. But the path downloaded by the file cannot be hidden, so page control is not used. When I study IIS in recent days, I suddenly suddenly became open. First edit or modify the website's web.config, join or modify the red area forms> authentication> 号 分 用户 用户]] "Roles =" [comma-separated role list] "/> -> authorization> Next, login.aspx joins Formsauthentication.SetAuthCookie (UID, FALSE) for login successors; FormSauthentication.RedirectFromLoginPage (UID, FALSE); Open IIS, find your website, right click, select the attribute, - "Main Directory -" Configuration and select Add in "Mapping", add as shown above. Ok, I'm big, I will now visit an XLS document under the main station http://localhost/sms/1.xls, what? Oh, yes, you need to log in. When you enter login information and log in to you can download this file! Yes, it is as simple, if you add ROLE, more complex control can be performed.