473,320 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Force a file download from ASP Page

Hi All

We have a page which we want to allow our users to download files.

Can someone point to peice of code that we can use to force the download as
opposed to opening the files in the browser.

Only one issue here the code need to work with UNC path like
\\myserver\files\ and not just c:\inetpub\wwwroot\files

I did have a look on internet but all of the code seems to be using local
path names but none with UNC path name.

Please help!

Sep 15 '06 #1
1 1776
If the problem is to force the download dialog :
http://support.microsoft.com/kb/260519/en-us

Else the principle is the same. The main issue with non local files is that
you have to make sure that the identity under which the ASP.NET code runs is
allowed to access this network share.

--
Patrice

"JP SIngh" <no**@none.coma écrit dans le message de news:
%2****************@TK2MSFTNGP05.phx.gbl...
Hi All

We have a page which we want to allow our users to download files.

Can someone point to peice of code that we can use to force the download
as opposed to opening the files in the browser.

Only one issue here the code need to work with UNC path like
\\myserver\files\ and not just c:\inetpub\wwwroot\files

I did have a look on internet but all of the code seems to be using local
path names but none with UNC path name.

Please help!

Sep 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matthew Sims | last post by:
Is it possible to force a download without using the readfile function? My website setup consists of my server that serves the web pages plus a high-speed file server elsewhere on the internet...
2
by: Jonathan Driller | last post by:
I am attempting to block repeat downloads from a site. I need to have a landing page pass a referer to a secured page. I have tried a meta refresh redirect and several Javascript redirect...
4
by: Kevin Muenzler, WB5RUE | last post by:
How do I force a browser to download a file instead of displaying it? In other words I have a page with MP3 and WMA files on it and I would like for the visitor to download the file instead of...
4
by: k.mitz | last post by:
Hi, I have a PHP application that allows users to generate a .pdf report of their database content. Normally, I've had to refresh a page to call the script to generate the report, so there's a...
4
by: tma | last post by:
Short of zipping my file, are there any other alternatives to the below? I'm trying to add anchors in code and I need the link to force a download of the .pdf rather than open a new window or...
0
by: comp.lang.php | last post by:
I have a form that when you click the "Generate Report" submit button, it will force download a CSV file, required for this project. On the very same page you also have a "Search" submit button,...
2
by: comp.lang.php | last post by:
class ReportGenerator { function ReportGenerator() {} /** * Generate the HTTP headers necessary for this file type. Can be called statically *
0
by: jinnareddy | last post by:
Hi, I'm unable to download a file that is having a 2-byte char in its name (e.g.テ) using force download option. Though, am able to download file names involving ASCII chars. I have tried URL...
6
by: ziycon | last post by:
I'm wondering if its possible to force a file to be downloaded when you go to a certain page. Say if you click on the link for the page and then it will go to that page and give you the prompt box to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.