472,340 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,340 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 1726
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...
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...
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...
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...
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...
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...
2
by: comp.lang.php | last post by:
class ReportGenerator { function ReportGenerator() {} /** * Generate the HTTP headers necessary for this file type. Can be called...
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...
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.