Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8277781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:47:29+00:00 2026-06-08T08:47:29+00:00

In our project we have got a admin application and a client application. The

  • 0

In our project we have got a admin application and a client application.
The admin application is used to manage all clients.

So when i logged in to server application , the admin credentials are saved in session.

After that i accessed client application in another browser. It contains a download functionality. After download what happens is that it clears all session data. So after each download i need to login again in the admin module.

Download handler

                if (context.Request["fileUrl"] != null)
                {
                    fileUrl = context.Request["fileUrl"].ToString();                    
                }
                string filename = System.IO.Path.GetFileName(fileUrl);    
                context.Response.ClearContent();
                   context.Response.ContentType = "application/exe";
                context.Response.AddHeader("content-disposition", String.Format("attachment; filename={0}", filename));
                context.Response.TransmitFile(fileUrl);                
                context.Response.Flush();

I have used an iframe to do the download. So i will set the source for iframe when download button is clicked

Code behind file

iframeDownload.Attributes["src"] = "DownloadHandler.ashx?fileUrl=" + downloadUrl;
//code to be executed after download
//here i am enabling a timer control

But i can’t find why the session is cleared after this download.
I found a similar issue in this SO post.
Session expires after file download

But for him it happens only in IE, but in my case its happening in all browsers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:47:31+00:00Added an answer on June 8, 2026 at 8:47 am

    Actually in my code after the successful download we need to delete a folder from my application. This causes the restart of App_domain.

    Ref: SO post Delete Directory from ASP.NET application returns to new session.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got an(other) error while trying to upgrade our large project to SL4.
I have got an error while trying to upgrade our large project to SL4.
I have got a question regarding suprepositories. Our project is set up like this:
I am using suds client for WSDL in our project. i have this code
Recently we upgraded our TFS server 2008 to 2010. Now, we have got problems
I have finally got the green light to use Memcached in our project (after
I want to apply NTFS-Search to our project. Our project have to find the
In our project we have requirement that, after receiving sms message from third party
In our project we have UI and logic (which may be represented as a
In our project we have a requirement that when a set of records are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.