Is Orchard 1.8.1 on .net 4.5.2 right ? I suffer anti-forgery error.

Topics: Installing Orchard
May 14, 2015 at 3:59 AM
Dear

Now, I upgrade my server from .net 4.0 to .net 4.5.2. Original 1.7.2 have:
System.Web.Mvc.HttpAntiForgeryException: The provided anti-forgery token was meant for user "xxxx\xxxxxx", but the current user is "admin".

I upgrade to 1.8.1. I can login but, can't go to dashboard. It always go to login screen.
Is Orchard on .net 4.5.2 OK ?

Thanks! Best Regards!
Developer
May 15, 2015 at 6:22 PM
It should work without issues, yes. There might be something else on your server. Do you have machine keys configured in Web.config?
May 17, 2015 at 1:40 PM
Hi Piedone

I have set the machine keys in web.config. But it no effect. My environment is under Activity Directory. Is form authentication ok with AD ?

Thanks!
Developer
May 17, 2015 at 5:24 PM
What do you mean by "My environment is under Activity Directory."? BTW anything in the logs by chance? Does your browser accept cookies?
May 18, 2015 at 1:14 AM
Edited May 18, 2015 at 1:18 AM
Hi Piedone

I deploy orchard in IIS server of company's private network which is AD authentication. I have check the log, its content is empty. I have accept cookies.

System.Web.Mvc.HttpAntiForgeryException: The provided anti-forgery token was meant for user "xxxx\xxxxxx", but the current user is "admin".

XXXX\XXXXX is my account of AD, but orchard is Form authentication, admin is my orchard account.

Thanks!
Developer
May 18, 2015 at 12:01 PM
Hmm, I'm still not sure how this works but this exception indeed indicates that there is a clash between AD and Orchard's authentication. Try to disable AD for the Orchard app somehow.
Marked as answer by ezrachen on 5/20/2015 at 7:28 PM