1

I have an IHttpHandler which I'm running on an Windows Server 2008R2, and IIS 7.5 with integrated mode. The handler should handle file uploads, triggered by a jQuery-Ajax call.

First It did not work on IIS at all, only in the VS 2010 Debugger. Somehow I did manage to register the Handler correctly and I was able to debug the HttpHandler - BUT: Asp.Net Authentication wasn't working: it always said I wasn't logged in. When I directly access the HttpHandler it all works like a charm. Only the jQuery-Ajax call drops dead.

For further information: I'm using FormsAuthentication and it all is running inside an MVC 3 Application.

Could it be related to a missing AuthCookie? I've also read this Article, but it doesn't seem to help me out: MVC + Ajax call to Controller Loses Authentication

If you need any further information / code, just ask for it, I'll post it asap.

Community
  • 1
  • 1
Phil
  • 568
  • 3
  • 19

1 Answers1

2

Could it be related to a missing AuthCookie?

Yes, it could, especially if your file upload component uses Flash it might not send the authentication cookie. You may take a look at the following article for a sample workaround which consists into sending the authentication cookie value in addition to the file in the request.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928