How To Improve Progressive Enhancement For Long-running Tasks
Nov 2, 2010
I'm looking for ways to improve a web page that initiates a long-running (>2 minutes) server-side task. The current version of the page just clocks for the full duration of the task, which can be very frustrating to the user.
I already have a few ideas about how I could improve the user's experience, but they all would involve the use of AJAX to some extent. Because of previous experiences that I've had on this project, I know that not all users have JavaScript enabled or available.
Assuming that the server-side process has already been optimized as much as possible, what else could I do to improve the experience of all users as much as possible?
View 2 Replies
Similar Messages:
Jan 12, 2011
I would like to makea windows service. whenever the user of my ASP.NET application has to do a time-consuming task, the IIS would give the task to the service which will return a token(a temporary name for the task) and in the background the service would do the task. At anytime, the user would see the status of his/her task which would be either pending in queue, processing, or completed. The service would do a fixed number of jobs in parallel, and would keep a queue for the next-incoming tasks. In addition there would be a WinForms application for system administrator that would allow adding special ADMIn tasks such as "Clean orphaned files" or "archive data of inactive users".
Can you point me to something that can jump start me on this as a whole concept - I know I can google for windows services and I am able to do it myself from scratch but time is of the Essence so maybe you know of something that is already there and i can use block to build out of.
View 1 Replies
Apr 1, 2011
I need to invoke a long running task from an ASP.NET page, and allow the user to view the tasks progress as it executes.
In my current case I want to import data from a series of data files into a database, but this involves a fair amount of processing. I would like the user to see how far through the files the task is, and any problems encountered along the way.
Due to limited processing resources I would like to queue the requests for this service.
I have recently looked at Windows Workflow and wondered if it might offer a solution?
I am thinking of a solution that might look like:
ASP.NET AJAX page -> WCF Service -> MSMQ -> Workflow Service *or* Windows Service
View 3 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
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 4, 2011
We have a timer process (a JQuery plugin) that redirects after X number of minutes to the login page, all via JavaScript. When the timer hits zero, I want to run a task (could be anything; however, in this specific scenario, it's a web service call).
So the process does:
if (zeroedOut) {
window.setTimeout(function() {
//Run finish-up processes
}, 0);
window.location = "login.aspx";
}
The issue I'm having is the web service that runs with the finish-up processes is not being called. The web service call happens, the redirect happens, I don't see any errors (I have try/catch statements around the setTimeout call), but no WS call.
View 1 Replies
Mar 8, 2010
I have selected around hundred data and then bind to the repeater each times it take a long time to save data after clicking the save button. How can i improve the performance?
View 6 Replies
Aug 22, 2010
I need CLI for our asp.net mvc application to perform maintenance tasks and some status tasks.
I think powershell is designed to provide CLI. But i do not know anything about it other than name.
How can i host powershell in asp.net mvc running in iis to provide CLI for custom tasks?
View 2 Replies
May 24, 2010
I have just started to look at the new "System.Threading.Tasks" goodness in .Net 4.0, and would like to know if there is any build in support for limiting the number of concurrent tasks that run at once, or if this should be manually handled.
E.G: If I need to call a calculation method 100 times, is there a way to set up 100 Tasks, but have only 5 execute simultaneously? The answer may just be to create 5 tasks, call Task.WaitAny, and create a new Task as each previous one finishes. I just want to make sure I am not missing a trick if there is a better way to do this.
[code]....
View 5 Replies
Mar 18, 2010
In an asp.net web form, I keep getting a connection reset error message. The page is doing a some long running processing (about 2-5 minutes).
I have no problem when the web request comes from the same machine as the web server. But when the request originates across the network, I get a connection reset error about 1:30 or 2 minutes into waiting for a response.
I have set the in web.config for this application and put the application it's own application pool.
What else can I try?
Edit
The purpose of this page is to accept input from the user, calculate something, and send the result back to them. The long running calculation isn't something I can offload until a later time.
View 2 Replies
Jan 27, 2010
My application is a asp.net 3.5 running on iis 6 (windows 2003)
This application is serving 1000's of users daily (100-500 users online).
I want to send an email newsletter to customers weekly.
Around 200,000 emails every time.
This is the code im using:
ThreadPool.QueueUserWorkItem(new WaitCallback(AsyncProcessMailerQueue), null);
private static void AsyncProcessMailerQueue(object data)[code]....
When testing this locally (on my dev machine) i see the application is working alot slower.
Is there a better way to write this code? Should i use ThreadPool.QueueUserWorkItem or create a new thread using Thread t = new Thread(new ThreadStart(DoWork)); ? Will it be better to create a totally seperate application for the purpose of sending the newsletters. will that help if ill run this application on the same machine?
i've seen other posts here talking about ThreadPool vs Thread but its seem no one is sure which is better.
View 3 Replies
Jul 23, 2010
When an ASPX page needs to make a call to a potentially long-running operation (lengthy DB query, call to a remote webservice, etc.), I use RegisterAsyncTask, so the IIS worker thread is returned to the pool, rather than being tied up for the duration of the long-running operation. However ASMX webservices don't have a RegisterAsyncTask function. When an ASMX webservice needs to call a potentially long-running operation, how can I implement the same behavior as RegisterAsyncTask? Note: the ASMX webservice is implemented as a script-service: returning json to a direct jQuery/ajax call. Therefore, I cannot use the "BeginXXX" approach described by MSDN, since that implements the asynchronous behavior within the generated client-stub (which isn't used when calling the webservice directly via ajax). EDIT: Adding source code: implemented the BeginXXX/EndXXX approach listed in John's answer. The synchronous "Parrot" function works fine. But the asynchronous "SlowParrot" function gives an internal server error: "Unknown web method SlowParrot"
WebService1.asmx:
[code]....
View 2 Replies
Jan 28, 2010
Note:- i don't want to use updateprogress etc. control of ajax
on button click, long task(e.g thread) runs in my webpage for about 4-5 minutes.I want to show status to user either by a processing image through javascript(image must be shown in a certain part of page other part of page will remain intact) or an exact status of process if possible. i have tried a lot but all in vein.
View 5 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
Mar 2, 2010
I am using SOA architecture, any one guide me what major and minor thing we need to take in long running.
View 3 Replies
Jun 11, 2010
I have a report that takes a couple of minutes to generate.What I am trying to do is display a progress indicatior onscreen (progress bar or spinning circle) while this is running.I was thinking of using javascript to display the progress indicator but am not sure how to get started on this. am using ASP.NET 2008, C#.
View 8 Replies
May 14, 2010
Situation:I have an ASP .NET application that will search through docs using Lucene. I want to run the initial indexing (the index will be incremental after the initial run so there wont be need to index the whole directory again in future). Currently, I have about 5GB of docs (45000files).Problem: My application times out before completing the process. I have altered the TimeOut like this:HttpContext.Current.Server.ScriptTimeout = 200000;but it still does not complete the process.
View 1 Replies
Sep 20, 2010
I have NHibernate sessions cached in the ASP.NET session.
I came across a situation where a user edited an object so it's in their first level cache in the ISession. Another user then edited the same object.
At this point User1 still sees their original version of their edits where as User2 sees the correct state of the object?
What is the correct way to handle this without manually calling session.Refresh(myObj) explicitly for every single object all the time?
I also have a 2nd level cache enabled. For NHibernate Long Session should I just disable the first level cache entirely?
Edit: Adding some more terminology to what I'm looking to achieve from 10.4.1. Long session with automatic versioning the end of this section concludes with
As the ISession is also the (mandatory) first-level cache and contains all loaded objects, we can propably use this strategy only for a few request/response cycles. This is indeed recommended, as the ISession will soon also have stale data.
I'm not sure what kind of documentation this is for it to include both probably and then immediately say the session will have stale data (which is what I'm seeing).
View 3 Replies
Jan 30, 2010
I've been having a difficult time with this. I have an asp.net page. The user hits the "Run" button and I have code IN AN ASSEMBLY, not in the APP_CODE folder that is called and runs a long process that moves product info from a file into the database. While the user waits, I would like them to see status updates like what product the import process in on and status info. I'm assuming I'd break off into another thread and use Ajax but I have no idea how to do this.
View 4 Replies
Sep 9, 2010
I have a long poll HTTP request using ASP.NET 4, MVC 2 and AsyncController. If a user closes their browser and kills the HTTP connection without the request completing, I'd like to know about it and completely clean up after them. If I don't, the open and incomplete requests just sit there and eventually IIS stops accepting new requests.
You can simulate my long running HTTP request by making a normal ASP.NET application with a page that has a Thread.Sleep. Even if you close the browser, the request carries on as if it hasn't.
There is a property called Response.IsClientConnected that gets switched to false if the client disconnects, and I can poll this to achieve the desired effect but it's not very clean and I'd like to avoid polling. Is there a way of getting notified when this happens rather than having to poll this property?
View 1 Replies
Aug 18, 2010
I have a button clicking which a storedproc runs for long time in buttons onclick event.
I have a grid which will show log table data which gets updated by the storedproc.
I want to refresh the grid to show the updated log while the storedproc runs.
Is it possible?
View 2 Replies
Aug 13, 2010
Wondering if there is a performance difference between letting a long running process hang in asp.net vs running the process via a windows service. I have done this once before and the windows service was much quicker and didnt bog down my system, whereas the asp.net request seemed to wreak havoc.
View 1 Replies
Jun 16, 2010
I have a site that calls a long running stored procedure that eventually times out the UI. The procedure simply runs some logic in the database, and kicks of a secondary process. No data is ever returned to the UI, so I don't need the UI to wait for anything.Is there a way to call the stored procedure from the UI and move on without having the UI having to wait for the store procedure to complete?
View 4 Replies
Nov 30, 2013
How to show progressbar when processing a text file of million lines?
I checked your thread --> [URL]
But what I want is the progressbar should show percentage exactly.
View 1 Replies
Mar 19, 2011
How can I show loading image for the user while executing long running process in an ASP.Net Ajax application? Is there a way other than using Page Methods? Any ideas?
View 2 Replies