Long Running Web Page - Generate A Text File Conforming To A File Specification?
Jul 8, 2010
I have an application I am trying to write that generates a text file conforming to a file specification, and the file could contain thousands of lines. This part is easy. The more challenging part for me is the user interface. It needs to be a web interface with various options to affect what data gets on the file; this part is no problem. The process for generating the file, though, could take a little time depending on the amount of data , and I would think the web page would time out.
What options do I have for the UI? Could I create some sort of service that the page calls and runs in the background? When the process errors or is finished, I'm thinking there could be an email sent out, or even messages displayed on the page.
View 4 Replies
Similar Messages:
Feb 3, 2011
I have the following scenarion. I set a variable to a very long string. I then want to save the contents of the string into a file 'c:ewFile'.
declare @tableHTML nvarchar(max)
set @tableHTML = ...
--now i want to save the value of @tableHTML into a file called 'c:
ewFile'.
View 4 Replies
Jan 11, 2011
I want to generate a text file using jquery/javascript/any.
View 8 Replies
Dec 3, 2010
i need to split richtextbox text by enter char an then generate an xml file from the items.
View 7 Replies
Jun 16, 2010
I've developed a web application to accept video file uploads and then pass them to a backend service on an external server. The application runs without error on the visual studio debugging webserver, but once on a production iis 6 or 7 server, yields a timeout error at about a consistent amount of time into handling a large upload. Specifically, it errors in the middle of transferring the video file to the external server, once the application has successfully received it from the client. I'm aware of several timeouts to be configured related to the problem, and have done so. The application's web config has been tested with one or both of the following settings
<system.web>
<httpRuntime executionTimeout="9999999" maxRequestLength="2048000" />
</system.web>
and
<configuration>
<location path="default.aspx"> (the page at issue that's timing out)
<system.web>
<httpRuntime executionTimeout="9999999" maxRequestLength="2048000" />
</system.web>
</location>
</configuration>
And within the initialization of the webrequest made to the external server to send the video received from the client browser:
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
httpWebRequest.ContentType = "multipart/form-data; boundary=" + boundary;
httpWebRequest.Method = "POST";
httpWebRequest.Timeout = System.Threading.Timeout.Infinite;
So with the execution time limits on both the webform as a whole and the connection made to the external server, I'm at a loss for what timeout is left unconfigured, or how to determine such, when I continue to get the following error: Unexpected error executing Brightcove Upload:...........................
View 3 Replies
Jan 12, 2010
I have a long-running WCF service that I need to call, but I would like to do is to open modal window (modal popup extender) that simply shows progress and stops the user from interacting on the page until the service returns. What I was trying to do was the following:
1. Click button to activate the process which calls a method in my code-behind.
2. This method opens my modal panel with some pretty animation.
3. I call my WCF service asychronously so that the UI will refresh.
4. Service ends which calls my delegate I setup.
5. My delegate method would then refresh the page with results, and dismiss the model popup.
View 1 Replies
Jul 1, 2010
I am executing a long-running Oracle stored procedure from .NET. The procedure takes about three hours to run. Ideally, the user should be able to kick off the procedure, close the browser, and come back later to check the results.
The problem is that the connection to the Oracle procedure is lost after exactly an hour. As you would expect, the Oracle procedre runs to completion if it is executed from SQL Plus. Strangely enough, it will also run to completion if I run in debug mode on my local machine (I start two threads, one of which executes the procedure. I set a breakpoint on the second thread).
Here is my connection string:
data source= (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=serverx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TestSID)))
Some relevant sections from web.config:
<sessionState mode="InProc" cookieless="false" timeout="3000" stateNetworkTimeout="72000"/>
<httpRuntime executionTimeout="18000" maxRequestLength="2097151" />
Any thoughts as to why the connection is being lost in exactly an hour, and what I can do to maintain the connection until the procedure finishes?
View 1 Replies
Apr 1, 2011
for example:
[Code]....
I need both show the cshtml page,and persist it to a file for next visit.
first I found Response.OutputStream, but it was unreadable.
then I found in asp.net we could override Page's Render method to achieve it,but I don't know in webmatrix how to do it.
and in MVC we could use ActionFilter, but I really don't find how to achieve it in webmatrix.
View 4 Replies
Jul 16, 2010
i have genarated a xml file through the asp.net code as
public bool createxml()
{
DataSet ds = new DataSet();
clsRegister obj = new clsRegister();
int i = 0;
string strpath = string.Empty;
XmlTextWriter objwriter = new XmlTextWriter(Console.Out);
ds = obj.searchgallery(4);
try
{
strpath = "d:\hellojhasi\glance\jhansigallery\gallery.xml";
objwriter = new XmlTextWriter(strpath, System.Text.Encoding.Default);
if (ds.Tables[0].Rows.Count > 0)
{
for (i = 0; i < ds.Tables[0].Rows.Count; i++)
{
objwriter.WriteStartElement("picturegallery");
objwriter.WriteElementString("fullimage", ds.Tables[0].Rows[i]["fullimage"].ToString());
objwriter.WriteElementString("thumbnail", ds.Tables[0].Rows[i]["thumbnail"].ToString());
objwriter.WriteElementString("title", ds.Tables[0].Rows[i]["title"].ToString());
objwriter.WriteElementString("description", ds.Tables[0].Rows[i]["description"].ToString());
objwriter.WriteElementString("height", ds.Tables[0].Rows[i]["height"].ToString());
objwriter.WriteElementString("width", ds.Tables[0].Rows[i]["width"].ToString());
objwriter.WriteEndElement();
}
}
else
{
objwriter.WriteEndElement();
}
objwriter.Flush();
}
catch (Exception e)
{
}
return true;
}
the code executed well.but the xml file when opens gives the following error
The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Only one top level element is allowed in an XML document. Error processing resource 'file:///D:/HelloJhasi/glance/jhansigal...
View 1 Replies
Mar 22, 2011
I want to generate PDF files from Word Documents(.doc, .docx) or excel documents(.xls,.xlsx).
I tried using ITextSharp but with that I am not able to render the images/tables etc of word document into the pdf.
View 2 Replies
Oct 12, 2010
I have an input type, so a text box which has a browse button next to it. When it is clicked, the file that is selected has it's full path placed into the text box.
<input type="file" runat="server" id="txtFilename" style="width:400px" />
Where is the event! Now that I have the path to the file in the textbox of the input type, I want to load each line of this file into a textbox that is able to handle multiline text. I don't want the file to be uploaded to the website. I just want to contents of the file read and placed in a textbox all with one click on the browse button.
View 2 Replies
Oct 11, 2010
I wrote a test page that does a bunch of busy work in a method called at page load. This process as I have it now takes around 12 seconds.
If I try to load another page while the first long running page is loading, this second page doing nothing except writing out a world, it doesn't load until the first long running page is finished.
Why is this the case? I would think IIS would be able to handle multiple concurrent connections, it seems crazy that one long running page would stop every other page in the application from loading. I must be missing something or not understand how IIS works.
I would think multiple independent requests would be spawned on different threads. Is this only the case if the requests are from different sessions entirely? Are all requests from a single session bound to a single thread?
View 1 Replies
Dec 30, 2010
In an ASP.NET WebForms 2.0 site we are encountering an intermittent bug in IE6 whereby a file download attempt results in the contents of the being shown directly in the browser as text, rather than the file save dialog being displayed. Our application allows the user to download both PDF and CSV files. The code we're using is:
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.AddHeader("Content-Disposition", "attachment;filename="theFilename.pdf"");
response.ContentType = "application/pdf";
response.BinaryWrite(MethodThatReturnsFileContents());
response.End();
This is called from the code-behind click event handler of a button server control. Where are we going wrong with this approach? Edit Following James' answer to this posting, the code I'm using now looks like this:
HttpResponse response = HttpContext.Current.Response;
response.ClearHeaders();
// Setting cache to NoCache was recommended, but doing so results in a security
// warning in IE6
//response.Cache.SetCacheability(HttpCacheability.NoCache);
response.AppendHeader("Content-Disposition", "attachment; filename="theFilename.pdf"");
response.ContentType = "application/pdf";
response.BinaryWrite(MethodThatReturnsFileContents());
response.Flush();
response.End();
However, I don't believe that any of the changes made will fix the issue.
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
Jan 24, 2016
I need to compare two csv files fields via c# alone where I need to give the path of both the files.
There is no asp.net web page only via c# code to compare the two contents with semi colon separated.
View 1 Replies
Aug 31, 2010
How do I read/write a text file on another server from a web page.I get the error "Access to the path '//Server2/mydatafiles/test.txt' is denied". I do not get the error if I am running the browser on the server where the files exist.I think I need to set permissions on the destination server in some way.
View 4 Replies
Jan 20, 2011
On my current project I have to accept 2 Excel spreadsheets that will be uploaded by clients, process them and create a download package based on this information. This process includes extracting data from the sheets, updating our databases and building several PDF files for the download package. This takes between 15 seconds to 2 minutes to complete, depending on the complexity of the request. Naturally, I want to show some kind of processing indicator rather than just leaving the user hanging while the page loads.
Here's the problem: How to show this processing indicator.
I have to do a full postback to upload the files so this eliminates several nice AJAX indicator methods (sponsoring users rejected the AJAX toolkit async file upload, saying it was confusing to them). If I process on any of the page events during the postback, the page doesn't load until the lengthy process is completed so the browser/site looks 'hung'.
Basically, I need some ideas on how to display a 'building your download' graphic while the lengthy process is working that will also work with a full postback.
View 4 Replies
Aug 5, 2010
Whenever I add an entry to the Hosts file on Windows, it takes a long time for the change to take place? I have tested using Firefox and IE and it seems to take around 5 minutes on both of them before the new IP/Domain entry on Hosts is recognised.
Is there anything I can do to overcome this? Perhaps "refreshing" the cache in some way? ipconfig /flushdns doesn't work.
View 1 Replies
Feb 28, 2011
by looking at using the XmlDocument and creating elements and attributes and then inserting them into the document. Pretty soon this looked like a massive amount of work for all the elements I have to add.What are the repercussions of treating the config file as one big long text string and doing a replace at certain points to add my entries. Something like this...
private void InsertXMLElement()
{
StringBuilder webConfig = new StringBuilder();
// get the file into a stringbuilder for manipulation
using (var sr = new StreamReader("C:web.config"))
{
webConfig.Append(sr.ReadToEnd());
View 3 Replies
Oct 29, 2010
My file upload control is in page for editing records so i want to retrieve the path stored in database and assign it file upload control. i have written select query to get data but i do not know how to display the stored file path in file upload control.
View 1 Replies
Aug 8, 2010
I would like to know if the normal procedure for creating text files would work the same on a mobile website?
1. I would like a text file created on the server (not users pc) when user clicks a button on the web page.
2. How do I refresh an image every few seconds, only the image not the whole page.
View 4 Replies
Jan 29, 2010
i have a fileupload control which i use to upload file to the server. after the upload is successful i enable a hyperlink with the name of the uploaded file.
i want the user to be able to view this file in the browser after the file has been uploaded.
i did try assigning the navigateurl for the hyperlink = HttpContext.Current.Request.MapPath(".") + "\folder1\" + fileName;
which dint work. all uploaded files are being stored in a folder inside my solution directory on the server.
View 7 Replies
Mar 26, 2010
Currently we are saving files (PDF, DOC) into the database as BLOB fields. I would like to be able to retrieve the raw text of the file to be able to manipulate it for hit-highlighting and other functions.Does anyone know of a simple way to either parse out the files and save the raw text on save, either via SQL or .net code. I have found that Adobe has a filtdump utility that will convert the PDF to text. Filtdump seems to be a command line tool, and i don't see a way to use a file stream. And what would the extractor be for Office documents and other file types?-or-Is there a way to pull out the raw text from the SQL Full text index, without using 3rd party filters?Note i am trying to build a .net & MSSql solution without having to use a third party tool such as Lucene
View 5 Replies
Feb 9, 2011
i want to generate the xml file from edm schema for indivual tables data
View 1 Replies
Jun 30, 2010
saving my aspx file takes too long, it has some nested tables, but it is nothing huge, it has like 50+ overall controls on the form. When I hit the save button, it takes a few minutes and drives cpu crazy, so I am guessing it is doing something in the background.
So, what is the reason, any clues how to speed this up?
I am using Vs.Net 2010 Ultimate
View 2 Replies