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
Post a Comment