开发者

Blank LogOn view in MVC application

开发者 https://www.devze.com 2023-01-07 01:14 出处:网络
On Friday I gave a demo of an MVC application using the Authorize attribute on my JobCardController, and all was well.This morning, when I attempt an unauthorized action, I still get redirected to the

On Friday I gave a demo of an MVC application using the Authorize attribute on my JobCardController, and all was well. This morning, when I attempt an unauthorized action, I still get redirected to the LogOn view, using the below URL, but I appear to have what my reading tells me is called a White Screen of Death, i.e. nothing but white background and no actions invoked.

http://localhost:34054/Account/LogOn?ReturnUrl=%2fJobCard

ADDENDUM: I forgot to mention that I have moved the Account models and services out into my DataObjects and Services projects, but I had done this last week already without this problem.

I'm not asking what is wrong, but what are the common faults that could cause something like this and how can I start debugging this mess?开发者_如何学JAVA

SOLVED: Somehow an Authorize attribute had landed up on my whole controller class, as in,

[HandleError]
[Authorize]
public class AccountController : BaseController

I removed that and everything is working again.


Somehow an Authorize attribute had landed up on my whole AccountController class, as in,

[HandleError]
[Authorize]
public class AccountController : BaseController

So, the controller was being repeatedly hit by an unauthenticated user for the same action invocation. I'm surprised this didn't cause some sort of 'stack overflow' condition.

0

精彩评论

暂无评论...
验证码 换一张
取 消