Web Forms :: Struggling To Get File Downloads Working For Some Time Now?

Apr 6, 2010

I have been struggling to get file downloads working for some time now. Files that are a few Mb or less don't seem to cause a problem but larger files stop after a minute or so. I have tried two methods so far and neither seems to work any better than the other.

First Method:

[Code]....

Second Method:

[Code]....

I am well aware that the default timeout for a script is 90 seconds, so in the page load event I alter this to 10000 seconds for both the above examples.

[Code]....

[Code]....

This makes absolutely no difference - and besides this the download does not necessarily stop after 90 seconds - it is usually somewhere around 90 seconds but I have witnessed it stopping after 120 seconds. I don't have anything set up in my web.config file for this as I don't want to set large timeout values for the rest of my site. Does anyone have what I need to do to get my files to download and not stop after a minute or two?

View 5 Replies


Similar Messages:

Web Forms :: Count Downloads Of A File From My Webpage?

Mar 20, 2010

This is my first time coding with ASP.NET!I've created a simple webpage and I need to know how to count the number of downloads of a file from my webpage.The download will be started through a button.And the other question is:Where should I store this information?

View 4 Replies

Web Forms :: Multiple File Downloads From Website?

Mar 5, 2010

want to download the individual files from weburl. There are images listed on the website along with the check box for each image. User can select one or more images by checking the checkbox. When user click on Download button it should start downloading the files sequentially one after the other. File size is between 20mb to 200mb each.

View 4 Replies

WCF / ASMX :: Internet Explorer Downloads JSON To A File

Nov 27, 2010

i have a few calls however when i type in the URI into the address bar in internet explorer it prompts me to save the file. However google chrome displays it automatically in the browser page. Does anyone know why this would occur, here is an example of one of my calls;

[Code]....

[OperationContract]

View 1 Replies

Configuration :: File Downloads From Server Hanging All Started Since Yesterday

Jul 26, 2010

I was able to download files from our server all types with out no problem,

when the download process starts the app asks open , save or cancel.

when i click open or save, i can see the progress bar starting from 0% onwards and used to go smoothly at 100kbps.

Since yesterday, it is hanging at 0% as if freeze, and all of a sudden the file gets open after 2 or 3 minutes.

this seems like something to do with IE i guess.

are there any security or any thing on client machine , which is giving me a feeling like a firewall or something.

View 1 Replies

Web Forms :: Way To Count The Number Of Downloads Someone Has Made Through A Hyperlink?

Jan 29, 2010

I guess what im really saying is if i put a link to an mp3 file on a page, and i wanted that file to be able to be downloaded by the user is there a way to count the number of times that link has been pressed by a page user?

View 2 Replies

Web Forms :: Code Write File 2.0 Is Working In Firefox But IE Not Working

Aug 28, 2010

If Not IsDBNull(ext) Then
ext = LCase(ext)
End If
Select Case ext
'Case ".htm", ".html"
' type = "text/HTML"
'Case ".txt"
' type = "text/plain"
'Case ".doc", ".rtf"
' type = "Application/msword"
'Case ".csv", ".xls"
' type = "Application/x-msexcel"........................

View 5 Replies

AJAX :: Error On First Time Page Refresh Then Removes On The Second Time / Could Not Load File Or Assembly

May 20, 2010

Server Error in '/MedTegraSL.Web' Application.

Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.

Description:

An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.

Source Error:

[Code]....

Source File:

c:ProductiveTeamsMedTegraPresentationMedTegraSLMedTegraSL.WebMainMaster.Master Line: 16 Assembly Load Trace: The following information can be to determine why the assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' could not be loaded.

[Code]....

Stack Trace:

[Code]....

View 2 Replies

Web Forms :: Delete Not Working All The Time?

Aug 30, 2010

From time to time i am getting this error when attempting to delete a file.

Exception Details: System.IO.IOException: The process cannot access the file 'D:galleryimagesUntitled-1.jpg' because it is being used by another process.

And the times i see it most is if i upload the image and then within seconds try to delete the image.

View 9 Replies

Web Forms :: Validation Control Not Working For The First Time?

Mar 3, 2010

I have applied some asp validation controls on a page ,but on clicking Save button data is getting saved without throwing any validation . But as I am entering data for the next time and then click save button then it's working.

View 11 Replies

Web Forms :: GridView Sort Is Working Only First Time

Feb 16, 2012

My Gridview sort  is working only first time. My Gridview sort only first time when I click on any column

I want ASC > DESC 

Again DESC > ASC 

and Again ASC > DESC this way my sort should work 

I have changed my code 

I added Gridview binding to PAge_Load function 

Code is below 

Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim myUserInfo As GCS_User_Info = Session("UI")
        If Not Page.IsPostBack Then
               GRDView.DataSource = GetSortableData(String.Empty) 'System.Drawing.FontFamily.Families
               GRDView.DataBind()

[Code] ....

View 1 Replies

How To Track Downloads With C#

Aug 2, 2010

How to track downloads with ASP.NET?

I want to find how many users completed the file download?

Also How can make restrict user from specific IP?

for example if a user download [URL] the track will work automatically.

View 3 Replies

Web Forms :: Button Click Stopped Working After It Worked For Some Time?

Mar 17, 2011

Iam working on VWD express 2010, and things were going well, when the VWD crashed.I recovered my work and and realized that my controls stoped firing events.I removed and added button again, but in vain. I set "AutoEventWireup" and reset it also, but no use.I changed the code onto multiple systems. But the events wont fire. (I kept breakpoints also) My Web.config looks like this

[Code]....

And my page directive looks like this

[Code]....

And the non working code bit is this

[Code]....

View 4 Replies

Web Forms :: When The Page Is Loading First Time It Is Working Fine With Out Any Error?

Jan 18, 2010

last from the few days I am getting the following error in my production server("Index was outside the bounds of the array".).The follwoing error is coming in the webpartclass before adding the usercontrol to webpart.Strangely when the page is loading first time it is working fine with out any error.After 5,6 clicks in my page the above error is coming. It is working fine in my local machine and in development server.

The problem is only in production server.

base.CreateChildControls(); OTBTWorkshop = (UserControl)Page.LoadControl(@"~/_layouts/UserControls/tets/teest.ascx"); this.Controls.Add(OTBTWorkshop);

View 2 Replies

Providing Downloads On C# Website?

May 20, 2010

I need to provide downloads of large files (upwards of 2 GB) on an ASP.net website. It has been some time since I've done something like this (I've been in the thick-client world for awhile now), and was wondering on current best practices for this I would like:

To be able to track download statistics: # of downloads is essential; actual bytes sent would be nice.

To provide downloads in a way that "plays nice" with third-party download managers. Many of our users have unreliable internet connections, and being able to resume a download is a must. To allow multiple users to download the same file simultaneously.

My download files are not security-sensitive, so providing a direct link ("right-click to download...") is a possibility. Is just providing a direct link sufficient, letting IIS handle it, and then using some log analyzer service (any recommendations?) to compile and report the statistics? Or do I need to intercept the download request, store some info in a database, then send a custom Response? Or is there an ASP.net user control (built-in or third party) that does this?

View 1 Replies

Web Forms :: Required Filed Validation Not Working On Button Click On First Time?

Mar 4, 2010

Hello to all I am using required field validator and i want to disable it on buttob click event on submitt button but the button click event is not working properly as it disable the validator on second time when i click the button,and refersing the page first time and i do'nt want to referesh page here i am attching my aspx as well as aspx/cs code

[Code]....

[Code]....

View 2 Replies

Protect Link For Public Downloads?

Jul 28, 2010

I've got SL application where i should implement file managment subsystem. I've got hierarchical structure of filesfolders(just description). Also each filefolder has its own permissions to usersgroups. I would like implement that one user who has permission to download file couldn't give it to another user, who hasn't this permission. So if user has download permission he get link [URL] and download it. But he could give this link to another person without permission.

View 2 Replies

Generating And Deleting Temporary Downloads?

Feb 25, 2011

I have a few ideas on how to accomplish this, but before I make a big mess perhaps there's an obviously easy solution I'm not seeing.

So I have on my site software (.NET 2, C#) a calendar, and I've recently added some code to generate a temporary iCalendar file from an event, and e-mail it to the logged in user. That part works great; the temp file is created, a MailMessage is created with teh attachment, it's sent, and then the temp file is deleted.

I want to change this into a "download" as opposed to an e-mail. So I generate the temp file, but present it to the user as a download instead (so they can open/save it immediately). That's all fine, but where I'm stuck is how to "know" the download has been completed, so I can then delete the tempoary file.

I have "hacky" options like timers and whatnot to do cleanup, but I'm wondering if I'm missing a better solution.

View 4 Replies

.net - Custom HttpHandler To Block Downloads Of .wmv Files?

Jan 4, 2010

I create a custom http handler to block download of .wmv files e.g. www.pakdev.net/videos/file.wmv (blocked by httpHandler).

But the problem is that now silverlight cannot also stream these video files as they are blocked too.

View 1 Replies

Supporting Resumable HTTP - Downloads Through An ASHX Handler

Mar 25, 2011

We are providing downloads of our application setups through an ASHX handler in ASP.NET.

A customer told us he uses some third party download manager application and that our way of providing the files currently does not support the "resume" feature of his download manager application.

My questions are:

What are the basic behind resuming a download? Is there a certain HTTP GET request that tells me the offset to start at?

View 1 Replies

C# - Configuring HttpRuntime Execution Timeout For Large Downloads?

Feb 5, 2010

At my place of work, we have an ASP.NET page that uses the following code to perform a file download. We use this rather than Request.TransmitFile() because the file is coming directly from a zip archive.

private void DownloadStream(Stream stream)
{
int bytesRead;
int chunkSize = 1048576; //1MB
byte[] readBuffer = new byte[chunkSize];
while ( (bytesRead = stream.Read(readBuffer, 0, readBuffer.Length)) > 0)
{
if (!Response.IsClientConnected)
break;
Response.OutputStream.Write(readBuffer, 0, bytesRead);
Response.Flush();
}
}

I'm trying to determine a reasonable value for the httpRuntime executionTimeout setting. The files being sent range up to 1GB in size, and some of our users have very slow pipes* to the webserver (think 64K lines). We don't want these users to experience connection resets. However, we want to keep a reasonable timeout value for the rest of the site.

Is there a way to define an executionTimeout setting only for this specific page (or even make it unlimited for that page specifically)? What's the recommended approach? I know we'd probably be better off using a totally different method to serve the files (e.g. FTP), but we don't have the freedom to make that choice. All we can do is modify the code for the site.

Also, I do think these downloads should be compressed before sending, but that's another matter.

*Off-topic question: Is "slow pipe" an annoyingly mixed metaphor? I should probably say "small pipe" instead, but that sounds strange to me in this context. Opinions?

View 1 Replies

Setting Hyperlinks In Order For Users To Carry Out Forced Downloads?

May 7, 2010

I am using Microsoft's MVC design pattern and I have a method in my controller, which sets the data source of a gridview. Whilst I can bind all the other values in the gridview, I am stuck setting 4 hyperlinks. The hyperlinks need to work in the explanation given in the link below: [URL]for forcing downloads to keep the location of where files are saved to private, which I want set in the controller.

To fully explain what I am doing, in my controller for the gridview, I am setting the gridview's data source using ICollection, which is an object containing results from a query. From this collection, I extract a value which has the name of a folder which contains a number files. So, what I have done is to cast my collection to a object, to get folder name and then use a foreach loop to get each folder name. Then to get the files inside each folder, I use Directory.GetFiles, which returns a string array - I wrote string[] files = Directory.GetFiles(ConfigurationManager.appsettings["filepath"]+folderName); . I have set 4 properties for each Hyperlink I want to set.

It is at this point where I am stuck, because even though I can get to the files, I am unable to set the Hyperlinks to these files. Each time I try an set the NavigateUrl property, I get the error message Object not set to an instance of an object. Plus, I have two other issues to resolve:1) Even though there are 4 hyperlinks, not every hyperlink will be set. In other words, if there are only two files in the folder, I only want to set the appropriate hyperlinks. So, how can I iterate through the string array, and get each value inside the array to do a check?2) When I set my Hyperlinks in my controller, how do I simply pass the file and keep the file's actual storage location hidden as given in the link [URL]

View 5 Replies

File Upload Stopped Working - Only Working For About 100KB

Jan 10, 2010

Until the Dec 29th my website was working fine. Then My fileupload problems started happening. My fileupload page would simply quit and say the page can not be found. I maximized all my timeout settings and that did not work. I called my hosting company and apparently they have no problem using my page to upload files from their geographical area. So then I concluded it might be a network problem. I ran a trace route and could not really figure out where the problem was. So, I have no idea what is going on. Is it possible that my site is being blocked by some black list out there somewhere?

View 3 Replies

Web Forms :: Create Xml File At Run Time

Feb 9, 2011

In our application, we have a menu control that is bound by an xml file. This xml file will be created at run time based on the role/permission configuration. Of course, It is ideal to have this xml file created and lives in the memory. When a user log off or close the browser, its xml file is killed.

menuControl.Itemsource = "newlycreated.xml";

is the syntax to bind the xml file to menu control. I don't have an idea how to do it just yet.

View 2 Replies

SQL Reporting :: Services / Create A Report To Show The Number Of Downloads Per Category

Mar 26, 2010

Create a report to show the number of downloads per category. Order it by the number of downloads. Group it by category. The group header should contain total no. of downloads, which should be expandable to show actual no. of downloads sub category wise. The sub categories should also show the total no. of downloads for that subcategory. Each subcategory should be expandable and show the download numbers per product..

i have imlemented matrix for it so no need to insert group additionaly.i am facing problem in 'Order it by the number of downloads' when ever i use aggregate funtion for sorting it gives error like sort expression out of matrix

View 1 Replies







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