asp.net mvc 4 - How to Deny access to one page when you are not logged in MVC 4? -


i have non logged web application contain 50 pages, need have 1 logged page "testpage" how can this:

<authentication mode="forms">     <forms loginurl="~/login/loginexpiration.aspx" defaulturl="~/home/default.aspx" slidingexpiration="true" timeout="120" /> </authentication> <authorization>     <allow users="?" /> </authorization> <location path="testpage">     <system.web>         <authorization>             <deny users="?" />         </authorization>     </system.web> </location> 

in config file location means not page name folder. create folder called testpage, place page there , work


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -