Click here to Skip to main content
15,887,267 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: What wrong with my website Pin
hmanhha24-Mar-16 16:06
hmanhha24-Mar-16 16:06 
Questioncombining rewrite maps with an update panel Pin
Member 1061132123-Mar-16 6:37
Member 1061132123-Mar-16 6:37 
AnswerRe: combining rewrite maps with an update panel Pin
John C Rayan24-Mar-16 0:08
professionalJohn C Rayan24-Mar-16 0:08 
GeneralRe: combining rewrite maps with an update panel Pin
Member 1061132124-Mar-16 3:19
Member 1061132124-Mar-16 3:19 
GeneralRe: combining rewrite maps with an update panel Pin
John C Rayan24-Mar-16 3:46
professionalJohn C Rayan24-Mar-16 3:46 
QuestionMVC5 - How do it know? Pin
#realJSOP23-Mar-16 2:48
mve#realJSOP23-Mar-16 2:48 
AnswerRe: MVC5 - How do it know? Pin
#realJSOP23-Mar-16 3:33
mve#realJSOP23-Mar-16 3:33 
AnswerRe: MVC5 - How do it know? Pin
John C Rayan23-Mar-16 3:33
professionalJohn C Rayan23-Mar-16 3:33 
C#
0) When a user tries to browse directly to a controller action that is not specifically marked with the AllowAnonymous attribute, will the user automatically get redirected to the login page, or do I have to code it to do so?


You don't have to do anything. When a controller or action is decorated with [Authorize] attribute then the ASP.NET automatically redirects the user to login page if the user is not already logged in.
1) Is the Authorize attribute involved? If so, where do I put it - on the controller or on the individual actions?


If your all actions in a controller to be authorized then it makes sense to put the [Authorize] attribute at controller level. If you have to leave at least of one of actions to be [AllowAnonymous] then obviously you have no option other than doing it at action level.

Hope this makes sense

modified 23-Mar-16 9:45am.

QuestionWhat is difference between form authentication and claim authentication Pin
Tridip Bhattacharjee23-Mar-16 1:27
professionalTridip Bhattacharjee23-Mar-16 1:27 
AnswerRe: What is difference between form authentication and claim authentication Pin
Richard MacCutchan23-Mar-16 2:38
mveRichard MacCutchan23-Mar-16 2:38 
GeneralRe: What is difference between form authentication and claim authentication Pin
Tridip Bhattacharjee24-Mar-16 6:48
professionalTridip Bhattacharjee24-Mar-16 6:48 
GeneralRe: What is difference between form authentication and claim authentication Pin
Richard MacCutchan24-Mar-16 7:06
mveRichard MacCutchan24-Mar-16 7:06 
GeneralRe: What is difference between form authentication and claim authentication Pin
Tridip Bhattacharjee26-Mar-16 9:57
professionalTridip Bhattacharjee26-Mar-16 9:57 
GeneralRe: What is difference between form authentication and claim authentication Pin
Richard MacCutchan26-Mar-16 21:09
mveRichard MacCutchan26-Mar-16 21:09 
GeneralPlease help me with my project Pin
Member 1241095522-Mar-16 19:07
Member 1241095522-Mar-16 19:07 
GeneralRe: Please help me with my project Pin
F-ES Sitecore22-Mar-16 23:59
professionalF-ES Sitecore22-Mar-16 23:59 
PraiseRe: Please help me with my project Pin
Nathan Minier23-Mar-16 1:19
professionalNathan Minier23-Mar-16 1:19 
GeneralPlease help me with my project Pin
Member 1241095522-Mar-16 19:07
Member 1241095522-Mar-16 19:07 
GeneralRe: Please help me with my project PinPopular
OriginalGriff22-Mar-16 21:06
mveOriginalGriff22-Mar-16 21:06 
QuestionAjaxFileUpload - UploadComplete event not firing (on test server only) Pin
Stevens22-Mar-16 14:56
Stevens22-Mar-16 14:56 
Questioncreate .mdf file Pin
Member 1240930122-Mar-16 3:35
Member 1240930122-Mar-16 3:35 
AnswerRe: create .mdf file Pin
ZurdoDev22-Mar-16 9:02
professionalZurdoDev22-Mar-16 9:02 
AnswerRe: create .mdf file Pin
User 418025411-Apr-16 8:40
User 418025411-Apr-16 8:40 
Questionasp Pin
Member 1240930122-Mar-16 2:35
Member 1240930122-Mar-16 2:35 
AnswerRe: asp Pin
Richard MacCutchan22-Mar-16 3:10
mveRichard MacCutchan22-Mar-16 3:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.