1,105,288 Community Members

calling asp.net mvc ajax call using jquery post method expires the session

Member Avatar
nccsbim071
Junior Poster
128 posts since Jul 2009
Reputation Points: 25 [?]
Q&As Helped to Solve: 6 [?]
Skill Endorsements: 0 [?]
 
0
 

hi,

i have a website where i provicde a link. On clicking the link a controller action method is called to generate a zip file after creation of zip file is done, i show the link to download the zip file by replacing the link to create a zip with the link to download the zip.


the problem is that after zip file creation is over and link is shown, when user clicks on the link to download the zip file, they are sent to login. After providing correct credentials in the login page they are prompted to download the zip file. they sould not be sent to the login page. In the action to generate zip file i haven't abondoned the session or haven't not done anything that abondons the session.

the user should not be sen't to login page after successful creation of zip file user should be able to download the file without login.

i search internet on this problem, but i did not find any solution. In one of the blog written by hanselman i found this statement that creates the problem with the session: Is some other thing like an Ajax call or IE's Content Advisor simultaneously hitting the default page or login page and causing a race condition that calls Session.Abandon? (It's happened before!)

so i thought there might be some problem with ajax call that causes the session to expire, but i don't know what is happening?

any help

please

thanks

Member Avatar
nccsbim071
Junior Poster
128 posts since Jul 2009
Reputation Points: 25 [?]
Q&As Helped to Solve: 6 [?]
Skill Endorsements: 0 [?]
 
0
 

hi,
guys i found the solution to this problem. The problem was like this: I created a zip file in application folder and in .net 2.0 it is a rule that any change to the application files and folder causes the session to expire. As soon i created the zip file in the directory somewhere other than directory in application folder, everything worked fine.

anyways
thanks

Question Self-Answered as of 4 Years Ago
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: