tags:

views:

111

answers:

1

I am using the jQuery plugin to add support for SwfUpload by steven sanderson which allows files to be uploaded with ajax.

The problem is that Request.IsAuthenticated is always false with an ajax post. This means that User.Identity.Name = "" which doesn't allow me to load up values I need to save the file.

Is this by design and what is best practice?

EDIT: The request is authenticated when the page loads but only on the ajax post is it no longer authenticated. Other ajax calls are also authenticated properly.

A: 

Assuming that you are using forms authentication, I think the problem is that the swfUpload utility, which uses flash, isn't dragging along the proper authentication cookies for the site back to the server with it's post. You would have to go find out how to get the flash to bring the auth cookies back to the server with it's requests.

quick look:

http://www.google.com/search?hl=en&safe=off&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=pr3&q=swfupload+authentication+cookies&aq=f&oq=&aqi=

neouser99