2

Resolved

For windows Authentication, how about comment the OnActionExecuting code in AccountController

description

Good morining.

I encount a windows authentication problem. I use moov2's "AlexZh.WindowsAuthentication", it's really great. but when click "Logout" it will cause an exception. I have found on the method "OnActionExecuting" in Orchard.User.AccountController cause the exception.
I want to comment the code below:
       if (filterContext.HttpContext.User.Identity is WindowsIdentity) {
            throw new InvalidOperationException(T("Windows authentication is not supported.").ToString());
        }

In other word I want to comment the "OnActionExecuting". it will be OK? or it will cause something other exception?

comments

xiashiwendao wrote Oct 18, 2012 at 1:15 AM

I feel odd, why this controller throw the exception? Dose any other module/ function will used the identity mustn't be WindowsIdentity?

Piedone wrote Oct 18, 2012 at 7:52 AM

What do you really mean by "commenting" on that filter?

sebastienros wrote Oct 18, 2012 at 5:51 PM

Piedone, if you look at the code, it's a controller's method overriding the base filter event. He's suggesting to remove (or comment) this method.

sebastienros wrote Oct 18, 2012 at 6:46 PM

Fixed in changeset 3fb696ffa63c

Piedone wrote Oct 18, 2012 at 8:22 PM

I see, thanks.

sfmskywalker wrote Mar 28 at 12:28 AM

Fixed in changeset f00a67f746218a4a926072dbf7e26739ddf3bc1d