Web Forms :: Code To Hide Download Link Works, But Now Need To Access A File *outside* Physical Path?

Mar 20, 2010

here's the code so far:

[Code]....

[Code]....

mov is a quicktime file, my server has the mimetype: video/quicktime .......... but as I read, this code forces the save as download box which is exactly what i want :) now, here's the catch, i the file I am fetching is NOT on the physical path... it is on a completely different server:Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Response.Clear()
Response.ContentType = "x-msdownload"
Response.AppendHeader("Content-Disposition", ("attachment; filename=mydownload.mov"))
Response.TransmitFile("http://myOTHERserver.com/files/mydownload.mov")
Response.End()
End Sub

Obviously this doesn't work since TransmitFile requires that the file be on your physical path, so how do i do this? Someone said you must use the stream method. Do you have any sample code I could try? I've tried the HTTPStreamReader object but it's giving me issues, so I would love to find out if there is anyway this might work. Now here's some more important information: this are HUGE video files.. we are creating a downloads page... written in asp.net -- so you create an account using the .net membership class, then you select the file you want, go through a form where you enter your billing info and then after you pay a certain fee (this is already implemented), you go to your "downlaods" area in your account... there you have access to the files......... the reason i'm doing this is because i want to hide the download link, which will be something likehttp://myOTHERserver.com/2340987sdfkjhalsdlkjh23 ... (something really crazy)....... we don't want people seeing this on the status bar (Therefore hiding the download link is ESSENTIAL)........ the files are a good 500MB each approximately; so i would love to hear all of your suggestions as to making the streamreader work for me and how long would it take for the streamreader to READ the file........

View 7 Replies


Similar Messages:

How To Hide A Physical File Path On A Force Download

Apr 29, 2010

I have been supplied this example for a force download[URL]However, what I would like to know what to do is to hide from the users the physical file path from the users as they do not have direct access to this server. Is there away for me to keep this file path private on a download?

View 3 Replies

Web Forms :: Hide Download Links Works - Output File 0 Bytes

Mar 21, 2010

I have a gridview with a Download button that serves a download to a user. I put it in App_Data so its secure so people can't try to download it. However, when I use this code, the save as dialog box pops up, and when i hit save as, the file immediately finishes loading - and it's just 0 bytes. The file is 5 Megabytes.

[Code]....

View 3 Replies

Web Forms :: Secure File Download / Hide File Path And Location While Downloading Files

Jan 14, 2013

I have made an application where I am displaying the .pdf , .doc , .docx  files. These files are uploading from an Admin Panel.When user place a mouse pointer on download icon provided in front of every file, it shows the complete path where it’s get saved.I want to avoid this path visibility even when user place mouse on download icon and even if it Inspect an element (as most modern browser will have this functionality).

View 1 Replies

Configuration :: Access To Physical Path Denied?

Dec 11, 2010

Via my .aspx pages users can upload photos to my server, and also delete them again.

The uploading works, so users can write new photos to the physical location.

But when trying to delete those photos I get:

Access to the path 'E:wwwrootimagesphotos6_315_P1010619.JPG' is denied.

I checked (via Windows Explorer) what the security properties for that folder are: IIS_IUSRS group has read and write access...

View 1 Replies

Web Forms :: Hide Download Path Using Response.redirect?

Feb 5, 2010

How can i Hide download path in asp.net when i am using reponse.redirect("abc.zip") ?

Example if i used reponse.redirect("abc.zip") but if reponse.redirect("abc.zip") is wrong path it will display error with our full download path .if it right path it working fine .

If Clscon.rs.Read Then
Response.Redirect(Clscon.rs(9))
End If

View 7 Replies

Getting Physical Path Of .csv File?

Jun 11, 2010

i am trying to insert with bulk and getting the following

Cannot bulk load because the file "D:inetpub.........insertgid.csv" could not be opened. Operating system error code 3(The system cannot find the path specified.).

the path is correct, dont know why not working.

View 9 Replies

Physical File Path To Initialize In SiteMapProvider?

Mar 8, 2011

I have my owned siteMapProvider, I need phisical file path to initialize it but I can't use HttpContext to do that, because IIS 7 will thrown exception:

fileName = HttpContext.Current.Server.MapPath(fileName);

How can I do MapPath without HttpContext?

View 2 Replies

C# - Determine The Physical Path Of A File Without An HttpContext?

Aug 23, 2010

I have some processes that run without an HttpContext in an ASP.NET MVC web application. This process needs to be able to determine the physical path to the Contents directory of the application for reading/writing data. But, since it is without an HttpContext, I don't get to use fancy things like Server.MapPath and such.

View 2 Replies

AJAX :: Get Physical Path Of A File Using FileUpload Control

Jul 17, 2015

I am having a fileuploade control on my aspx page. On button click I want the physical fullpath of my file, which i am going to upload on server. If the file is in desktop then it should show C:Users Admin1DesktopSampleHonourImages.png

I have used Path.GetFullPath(Fileupload1.FileName) but it is giving C:Program Files (x86)IIS ExpressHonourImages.png instead of actual path

View 1 Replies

Web Forms :: Converting A Physical Path To Virtual Path And Vice Versa?

Oct 7, 2010

I have a code to open PDF file, like this

[Code]....

Over here I have created a folder with name Data inside my solution, so the Server.Mappath("Data") as well the statemet for converting assigning the src property of the IFrame I1 is working properly. But I want to use the files from a folder which resides in a network folder like

View 1 Replies

Web Forms :: FileUpload - Getting An Error 'C:/WebSite/userimages/' Is A Physical Path But A Virtual Path Was Expected

Jul 3, 2010

I am trying to upload a file Into a MapPath but I am getting a error 'C:/WebSite/userimages/' is a physical path, but a virtual path was expected. My code is:

[Code]....

View 6 Replies

Get The Physical Controller Class File Path Of The Executing Action Method?

Dec 21, 2010

Assume the current executing action method is Index() in Home controller. From within Index(), how to obtain the physical file path of the Home controller? Assume we don't know the file structure until runtime.

View 2 Replies

Web Forms :: Convert A Virtual Path To A Physical Path?

Jan 30, 2010

the syntax to convert a virtual path to a physical path.

I wanted to upload a file located in one server and i know only the website name.

View 3 Replies

Web Forms :: How To Download File From Uri Path

Jan 16, 2010

i want to to download file from uri path, i tried the following code but it through an exception

[Code]....

[Code]....

View 5 Replies

IIS7 Application Configuration - Placing Into Single Physical Path And Creating Multiple Pointing To That Path

Dec 20, 2010

I have a custom ASP.NET application that I utilize for several clients that I host. Each client has a separate domain and the application is normally a child application under the root domain [URL]. The application files are the same (aspx, ascx, style sheets, images, etc.). The only thing different is the web.config file for each client. As development of the application continues to evolve, I have to update the application for each directory and this obviously becoming tedious. I am trying to come up with a method keep the application up to date. My first though is placing the application into a single physical path and creating multiple applications pointing to that path (the problem with this method is I can't have different web.config files). I am curious as to what solution others are using in this scenario...

View 2 Replies

Web Forms :: Download File Using Path Stored In XML File

Jul 25, 2013

I need to retrieve and save a word document from a xml document ... I can retrieve name, phone number that and all .but i do no how  download and save a word document from xml database .  

<?xml version="1.0" encoding="utf-8"?>
<registeration>
<Date>
</Date>
<Name>
</Name>
<Qualification>

[Code] ....

View 1 Replies

Converting Virtual Path To Physical Path In A Handler?

Feb 14, 2010

I am trying to convert the virtual path to a physical path but don't seem to have Server.MapPath or HttpServerUtility.MapPath available in my handler. I add the System.Web namespace with no luck.

string virtualTargetFolder = String.Format("~/UserImages/{0}/Images/", user.ProviderUserKey.ToString());
string physicalTargetFolder = System.Web.HttpServerUtility.MapPath (virtualTargetFolder);

View 2 Replies

Forms Data Controls :: File Download Path?

Sep 22, 2010

I have a DataGrid which is populated by a list of the .doc files in a folder.When one of the items in the list is clicked the browser should then download that file for the user to open. At the moment when one of the items is clicked the browser attempt to download the file from the root folder of the website, is there a simple line of code I can use to say 'download the file from "root/folder/folder/folder/filename.doc" instead of from "root/filename.doc"Currently I am using this code:

[Code]....

[Code]....

View 2 Replies

Web Forms :: Hide Cancel Button In Browser File Download Box

Dec 21, 2012

I am downloading file in the asp.net application , where i need to hide the cancel button .i have to show only save button.

View 1 Replies

Unable To Download A .mobi File From Server Even Though It Exists (works For Pdf And Txt)?

Jan 6, 2011

i have a site that will enable users to download an ebook file.i have successfully built architecture to enable users to download pdf and txt files, but it won't work when i try with a .mobi file, even though i know the file exists.the site works by allowig users to upload their work as .doc, .docx or .odt. once it's verified, the site publishes it as .pdf, .txt and .mobi and makes it available for download. the download code is...

string mstitle = title.ToUpper();
string dlpath = [the server path] + msid + mstitle + ".mobi";[code]....

(there are also versions with .txt and .pdf) the file definitely exists at the location in .txt, .pdf and .mobi extensions. however, the .mobi version simply won't work i get an error 404 resource not found. mystifyingly, the pdf and txt versions work perfectly.

View 8 Replies

C# - How To Convert Physical Path To Web Path

Jan 21, 2011

I need to display an Image in web page. But the Image doesn't exist in the Web directory. If the image is under web directory I know that just "../Images/TN/my.jpg" will work. But the image is available in "D:ImagesTNmy.jpg" and My web site is deployed in "C:appsmywebsite". How do I convert the "D:ImagesTNmy.jpg" path to a relative path so that the Image will be visible in web page?

View 3 Replies

Set The File Path In Attachment / Assign The Path In Code?

Sep 15, 2010

I am using to send attachent from my host.. The file is located on my abc folder on my root, so it' like this:

root/abc/myfile.doc

Attachment attachFile =
new
Attachment(txtAttachmentPath.Text);

How can I assign the path in the above code?

View 1 Replies

C# - How To Write The Code For Self Expiring Download Link For Website

Jul 19, 2010

I am planning to sell digital goods on my website (Asp.net). After successful payment the customer will be redirected to the download page of my website, which will display the link to download the digital content stored in my server.

I want to secure the location of the file, by creating a disposable link to the file. Every time a customer visits this page a new download link will be generated for the same file. Also this link should expire after it is downloaded for the first time.

Is it possible to do it in asp.net ( C# preferably )? if yes how can i do it?

View 2 Replies

Forms Data Controls :: Download File From Server When Click In Gridview Particular Link?

Mar 24, 2010

On daily basis, I am saving a file in my PC. The name of the file is same but with different date including date. What I required to just there should be a gridview with hyperlink button(Download File) columns like this:

ReportDate Extent Status HostedOn HostedBy
DownloadFile 24/Mar/2010 0700 Hrs Daily Not Added --
DownloadFile 23/Mar/2010 0700 Hrs Daily Added 23/Mar/2010 James
DownloadFile 22/Mar/2010 2100 Hrs Daily Added 22/Mar/2010 Mike
DownloadFile 22/Mar/2010 0700 Hrs Daily Added 22/Mar/2010 James

When user click "DownloadFile" button then it should go to particular folder in server and download file. he task is very important and urgent for me.

View 21 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved