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 8110439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:45:16+00:00 2026-06-06T01:45:16+00:00

I am having a huge problem in all browsers. I have a site where

  • 0

I am having a huge problem in all browsers.

I have a site where clients can download a csv file that contains detail they need.

The problem I am having is that the csv file either downloads with no extension or as a htm file.

In the code I am specifying the file name with .csv, the file on the server is also a .csv.

The code is as follows

context.Response.Buffer = true;
context.Response.Clear();
context.Response.ClearHeaders();                    
context.Response.ContentType = "text/csv";
context.Response.AppendHeader("Content-Disposition", @"attachment,     
     filename=" + ((string)Path.GetFileName(downloadFilePath)));
context.Response.WriteFile(downloadFilePath);
context.Response.Flush();
context.Response.Close();

I have tried context.Response.ContentType = "text/html"; and context.Response.ContentType = "application/octet-stream";.

It is running on IIS6.

Does anybody know what could be causing this?

  • 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-06T01:45:17+00:00Added an answer on June 6, 2026 at 1:45 am

    Ok I have worked out why files are not downloading as CSV.

    its because the file name has spaces in it, so I need to enclose the filename so that it doesnt cut off at the space.

    Thank you for all your help

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

Sidebar

Related Questions

I have a rather unique problem that I'm having trouble solving. I have a
Hey all I am having a huge problem here evenafter following every step of
I've been having a huge problem with this. Xcode just simply turned my landscape
I want to download a huge file from an ftp server in chunks of
I am having a huge problem with this. I want to take my whole
I am having a huge problem with the eventlog on my server. Right let
i developed a project using Ruby on Rails and i having a huge problem
I am having a huge problem figuring out how to use a transparent background
I am apparently having a huge problem switching from the plugin version of Paperclip
I keep having complaints that users are logged in as each other. They can

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.