401 Access Denied Response every 2-3 Requests

Topics: Troubleshooting
Nov 19, 2011 at 5:21 PM
Edited Nov 19, 2011 at 5:49 PM

I'm having a recurring problem with my Orchard site and being redirected to the login screen every 2-3 requests, even though I'm already logged in. I'm wondering if I've got something misconfigured in the app or whether it's a problem with the hosting provider; My site is hosted on a shared Virtual Server with netcetera. Using Fiddler, I can see that the .ASPXAUTH authentication cookie is being sent with the request.

A typical example will be that I'll log in, edit an existing post (which takes 2 minutes tops) and then hit publish and be redirected to login. So, I'll log in again after which point the edit I've just made will be lost.

This is more of an annoyance than a showstopper for me (as I tend to use LiveWriter for handling the blogging side, avoiding the need to edit inside the web application), but any ideas as to what may be causing this? This isn't a simple case of the authentication timing out as this happens when the requests are seconds apart too.

Coordinator
Nov 19, 2011 at 7:29 PM

Have you defined a MAchineKey in the web config ?

Nov 20, 2011 at 3:34 PM
Edited Nov 20, 2011 at 10:47 PM

No I don't have a machine key in web.config. I'll specify one now.

UPDATE: Yes, this solved the problem. Thanks!