Getting Newest File From Large Directory?
Jun 25, 2010
I am searching for a way to get the most recent file from a large directory. The directory contains images taken by a webcam. The only technique I have found (which works...but very slowly) is to get all the files using DirectoryInfo.GetFileSystemInfos. The approach is so slow that is unusable. I need to only retrieve the most recent.
[Code]....
View 2 Replies
Similar Messages:
May 28, 2010
I just recently updated to the latest version of the AjaxControlToolkit and now my TabContainers don't work (only thing i'm using the toolkit for). It looks like the client code to make the correct tab visible is never getting called. The error I'm getting with Firefox is "Sys.Extended is undefined", and with IE I get "'Sys.Extended.UI' is null or not an object".
I'm using the .NET framework 3.5
1). I already changed all the ScriptManagers in my project to ToolkitScriptManagers per a javascript error message I was getting earlier.
2). I already checked my web.config and it looks good:
[code]....
View 4 Replies
Mar 17, 2011
I've had this project running for a couple of months using a couple of company-specific DLL's. I just downloaded and updated to the newest version and I am now receiving this error. I don't believe it is specific to the DLLs themselves, more something in my project not expecting new versions. The stack trace isn't very helpful.
Server Error in '/dashbad' Application.
Invalid token.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Invalid token.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[code]...
View 1 Replies
Jan 17, 2011
I have a text file with tab as delimiter. There are about 20 fields in the text file and the file size is about 150MB-200MB.
I need to filter out each row in the textfile based on its field criteria, For Eg: the i should ignore the particular row if the Field A is empty.
I know that by reading out the text file row by row it will be certainly slow.
how to read out the text file fast and also how to do the file processing for the read out text file?
View 4 Replies
Sep 24, 2010
What is better way to large upload file.using a web service or in application itself.If in application, how can we check that files is to upload in a regular interval.actually i dont want user to wait for complete uploading, when it starts uploading user will get response of uploaded and uploading will be done in backgroud.I am not sure this type of task can be done in webservice also so that user doesnot need to wait for complete uploading.and one more query which event fires when the page redirects to another page.Is it Page_UnLoad or Dispose
View 1 Replies
Dec 29, 2010
I am trying to upload file in WCF.When I try to upload file I am getting following error message. System.ServiceModel.CommunicationException:The socket connection was aborted.
View 4 Replies
Aug 20, 2010
I've checked many threads about this but I'm not sure how to fix this:When I try to upload a 33 mb file while debuggin, control directly falls into application_endrequest even when I've a breakpoint set to first line in application_beginrequest in my global.asax.cs. I can see the page in non-postback case.My maxRequestEntityAllowed is set to 400000, and in web.config I got
<httpRuntime maxRequestLength="1024000"/>
What else do I need to fix? I can upload a 25mb file btw.platform: IIS7, Windows 7 64 bit, .NET framework 2.0, integrated pipeline
View 1 Replies
Feb 4, 2010
I have a scenario which I am looking at where large files which are about 30-40 MB are being FTPed to a server. I am looking at creating a .net screen with the FTP control to upload the file to a Unix server. I need to know how much of a performance hit it is to work with such large files, is it a feasible option in this scenario? I might have to create a .net component for the same and call from ASP application. Is it doable?
View 3 Replies
Jul 22, 2010
i have write data from db to .txt file,where db have large amount data,i need to wite data into file, if some error occure, then reInitiated that file and write data again without stop process.that is Continuous calling same process
View 2 Replies
Sep 21, 2010
I have a database table that works as a file repository. Currently there are binaries stored in there and I want to pull the "large" ones out in chunks. Some of these files are in excess of 500 MB. I have business rules that dictate if the file is >5MB to transmit in chunks. <5MB and I can load into memory and rip out. I got the uploading in chunks to work, but how do I get it to pull it out of the DB in chunks?
Right now I'm getting hit with a 'System.OutOfMemory' exception. But when I recreate the byte array of the SAME size (empty though) it doesn't break.
Download Chunks (DAL)
public byte[] getBytesByDataID(int chunkSize, string dataID) { string query = "SELECT data.data " +" FROM data " + " WHERE dataID = @dataID"; openConnection(); cmd = new SqlCommand(query, myConnection); cmd.Parameters.AddWithValue("@dataID", dataID);
[code]....
View 3 Replies
Mar 6, 2014
How to play mp4 file in website which is having a size of approx 20 mb.
View 1 Replies
Apr 23, 2010
I have standard asp.net file upload control on a page. If a user try to upload large file they get all the cryptic error messages like page not found etc.I dont want them to be able to upload large files, but still want to show gracefull error message saying that file is too large to upload or something like that. Is there any way to do that?
View 9 Replies
Feb 8, 2010
how to download a large file with resume facility in asp.net.
View 1 Replies
Mar 7, 2011
i have a large excel file which has 1 lakh row , i want to insert these data in my table i am using entity framework for insert but it takes more than 45 minutes to insert which is too much, i want to speed up the uploading process what should i do. can I use multithreading for it if yes then how i can use? if any other way to do this process.
View 1 Replies
Apr 26, 2010
Easy way how to upload a large file from winforms c# to asp.net https (web service or asp.net page), with progress bar?
View 1 Replies
Oct 15, 2010
I have problem in my asp.net application. I have some file in floder (PDF, .doc, ,txt ) i want to open these files in my web browser .
Now my problem is large PDF files are not opeing in my browser even some less size pdf files are opeing prefectly and other files are also working good.
The following code i have wriiten to open the file
[Code]....
View 1 Replies
Apr 30, 2012
There is a requirement like in a web page having FileUpload control and button. I need to upload excel records to sql database. If the excel file having less than 1000 records then it is executing fine and if the excel file having more than 1000 records then it's giving me the error message like bad request (error code: 400). As per my requirement need to upload minimum 4000 to 5000 records on button click. Some times it is working fine in IE browser but not all the times. In mozilla not at all working if records having more than 1000. How can i over come this issue.
View 1 Replies
May 20, 2010
I'm using Filestream for read big file (> 500 MB) and I get the OutOfMemoryException. Any solutions about it?? I want this in my app asp.net: Read DATA from Oracle Uncompress file using FileStream and BZip2 Read file uncompressed and send it to asp.net page for download. When I read file from disk, Fails !!! and get OutOfMemory. My Code is:
using (var fs3 = new FileStream(filePath2, FileMode.Open, FileAccess.Read))
{
byte[] b2 = ReadFully(fs3, 1024);
}
// [URL]
public static byte[] ReadFully(Stream stream, int initialLength)
{
// If we've been passed an unhelpful initial length, just
// use 32K.
if (initialLength < 1)
{
initialLength = 32768;
}
byte[] buffer = new byte[initialLength];
int read = 0;
int chunk;
while ((chunk = stream.Read(buffer, read, buffer.Length - read)) > 0)
{
read += chunk;
// If we've reached the end of our buffer, check to see if there's
// any more information
if (read == buffer.Length)
{
int nextByte = stream.ReadByte();
// End of stream? If so, we're done
if (nextByte == -1)............................
View 8 Replies
Mar 1, 2011
I am doing a project, In that i have to store some content in excel file and should have to save as sample.xls. If the file is already Exists, then have to store sample1.xls and again if it is exists, then sample2.xls...like that.... How in c# code.
Actually, I have developed an Website. In that, one page contains a message text field, If a user typed some text & clicked save button, that content should be store in excel file and save in different name with sequence series..
View 2 Replies
Jan 15, 2011
I need large file upload support in my hosted (godaddy) medium trust asp.net app.It obviously needs to be responsive with indication of progress, so handling the stream myself is important.This all seems pretty simple and works well when in full trust:
1.Write an HttpModule that listens for file uploads.
2.Get the HttpWorkerRequest object from the Context using reflection.
3.Write out stream to a FileStream
All very well and good except that I keep getting permission exceptions when trying to get the HttpWorkerRequest object from the context in medium trust. Whether I use reflection or I use System.IServiceProvider.GetService() to get the object (which is clearly using reflection), I get the same error.
I have also tried using System.Web.HttpPostedFile. It has a property InputStream. But it seems this object is uploading the entire file on initialization, so no good.I have googled myself tired, and can't find another alternative.
Even if it is a security risk to let users have the HttpWorkerRequest object, surely the framework provides another way to handle the stream of files when Method="POST" and enctype="multipart/form-data"
View 1 Replies
Jan 23, 2011
My problem is Asyncfileupload control is working fine when i debug the application and upload large file...but when i run this from iis it only upload file less then 5 kb. why is that so?? i did try adding Httpruntime maxRequestLength="4096" i tried to find on search but no help... did m i mising any settings..??
View 3 Replies
Jan 26, 2011
I have a very large text file whose data I need to extract and display in a gridview control. The method I'm using now is as follow:
1. Read each line of the textfile using StreamReader, into a String.
2. Split the String and populate the fields of a detail object.
3. Add the detail object to a List.
4. Repeat steps 1 to 3 for each row of the text file.
5. Bind the list to the gridview.
I think most of the time is spent processing the text file data (steps 1, 2 & 3).
Is there any way this can be done quicker and more efficiently? At present, it takes ages to read and process a 76 mb text file.
View 7 Replies
Mar 8, 2011
This works in other browsers but not in chrome. I am trying to allow users to upload large files and have an ajax call to update them on the progress of the file upload.
So a unique ID is generated on the client side and added to the action of the form before sending. Then the form is submitted (form only contains a file upload input) and an ajax call is made to get the progress of the upload. The ajax call goes to another page and uses the ID to lookup the upload.
I am using JQuery 1.5.1. Debugging this and putting something on the error function give me nothing other than "error". Not very helpful. I used Chrome's debugger and it just says failed to load resource xxxx.aspx. xxx.aspx is the URL i needed. Turns out that there seems to be some sort of conflict between the form and the ajax call.
View 3 Replies
Sep 13, 2010
It is a very large .txt file (more than 3M), and produced everyday, the content is user's system log like below:
2007-11-01 18:20:42,983 [4520] INFO GetXXX() SERVICE START
2007-11-01 18:21:42,983 [4520] WARING USER ACCESS DENIED
2007-11-01 18:22:42,983 [4520] ERROR INPUT PARAMETER IS NULL CAN NOT CONVERT TO INT32
2007-11-01 18:23:59,968 [4520] INFO USER LOGOUT
View 14 Replies
May 5, 2010
I am using System.directory services namespace in framework 2 to query active directory. I have used fixed user account impersonisation in the web.config file, find the code:
<identity impersonate="true" userName="enterprise ang09" password="Telcome123"/>
<authentication mode="Windows"/>
I have disabled anonymous access in IIS. Also i have given Read & write access to the account tang09 for the website virtual directory and Microsoft.NET folder located in windows folder. But still i get prompted for the domain username and password to access the website.
View 4 Replies