Net - Update A Page From A Worker Thread?

Jul 30, 2010

I have a ASPX page which queries from a database. Once we have the dataset it is bound to a gridview and displayed on the page. All this happens in the Page_Load event.Ofcourse this a simplistic approach. What is the best way to inform the user that data is being retrieved and when we have the data to update the page with the results in the dataset.I want all this to happen within the same ASPX page and do not want to hop around pages to achieve this. I looked at update panels however it wasn't clear to me how this could be done with an update panel without having a control which triggers the update for the update panel. There are no controls on my page whhich initiate the database query, it occurs as the page is loaded

View 1 Replies


Similar Messages:

Using MapPath From A Worker Thread?

Feb 24, 2010

I have a WCF service method that's running in a worker thread I spin from another method. I need to map a relative service app path ("~/Templates/a.template") to the physical path ("D:WebTemplatesa.template"), but I can't use HttpContext.Current.Server.MapPath because HttpContext.Current is null in a worker thread. How else can I reach MapPath method?

View 2 Replies

Web Forms :: Create Worker Thread In Webpage?

Feb 5, 2010

I am developing an asp.net application which provide a UI for user to submit some kind of job.

Behind the scene, i created a thread to sleep around certain mintues and then process the submmitted job. I would like to ask this is right way to create some worker threads to process the jobs? any risk in threading? any other alternative?

currently, i am facing the timeout of asp.net session. For example, the period of sleeping is 25 mins, the thread will not be processed because the asp.net session is timeout in 20 mins.

View 2 Replies

Change Label.text Value From A Worker Thread?

Feb 7, 2011

i upload a file using ftp, and to not get my GUI stuck i use a thread which do the Job.

I want to display in a label control text value the remaining bytes.

how can do this. (i use VS.NET 2005, Web application)

View 1 Replies

Architecture :: How Can Thread Update A Variable Shared With The Main Thread

Nov 24, 2010

I'm new to threading and have used it successfully, but limited. I can spawn a thread and have the main thread reference variables in the spawned thread, but I don't know how to allow the spawned thread to reference (and update) variables in the main thread.

Any example threading code I've seen on the web appears to be WAY more complicated than what I do, so I am unable to understand or integrate into my code.

Here is a quick example of how I use threading:

[code].....

View 3 Replies

Cross-thread Operation Not Valid: Accessed From A Thread Other Than The Thread It Was Created On

Apr 2, 2010

I want to remove checked items from checklistbox (winform control) in class file method which i am calling asynchronously using deletegate. but it showing me this error message:-

Cross-thread operation not valid: Control 'checkedListBox1' accessed from a thread other than the thread it was created on.

i have tried invoke required but again got the same error. Sample code is below:

[code]....

View 1 Replies

AJAX :: How To Update UI With Work-progress Within A Thread

Jan 22, 2010

I want to update my UI with work-progress within a thread. So i am planing to call webmethod every 2 seconds to get the current progress status. This is my code but I can not complete it.

[Code].....

View 1 Replies

AJAX :: Thread Was Being Aborted - Update Panel Triggered By Timer?

Feb 8, 2010

I have an ASPX page with several update panels. They all have their UpdateMode="Conditional".

Some panels are refreshed when the user clicks a button and other are refreshed regularly, with a timer.

The panel refreshed with a timer launches a database query and many validations on the data. Then display the result in a panel when errors have been found.

That all works fine except when the validation has to delete files on the disk. (.txt, .jpg, etc it depends). In that case, after the validation is made, I am always kicked out of my website because of the error (Thread was being aborted). So I loose all my session variables which means I am not logged off.

Anybody had that kind of problem ? Is it normal that deleting files AND directories on the server make me loose my session? Is there a way to prevent that ?

View 3 Replies

Visual Studio :: Debug A Multi Thread Program To See Local Variables Of Each Thread Using 2008

Jan 27, 2010

How can we debbug a multi-thread program to see local variables of each thread using visual studio 2008.

View 1 Replies

What Are The Differences Between Currently Executing .NET Thread And Win32 Thread

Mar 24, 2010

I am reading the Asp.net security documentation on msdn.I come across these tow terms and get really confused.

# WindowsIdentity = WindowsIdentity.GetCurrent()

which returns the identity of the security context of the currently executing Win32 thread.

# Thread = Thread.CurrentPrincipal

which returns the principal of the currently executing .NET thread which rides on top of the Win32 thread.

View 1 Replies

C# - Lock Thread.sleep Not Working With .NET Thread?

Jun 25, 2010

I have a password page and when someone enters an incorrect password I want to simply foil a brute force attack by having

bool isGoodPassword = (password == expected_password);

lock (this)
{
if (!isGoodPassword)
Thread.Sleep(2000);
}
I would expect that this would allow all correct passwords without stalling, but if one user enters a bad password another successful password from a different user would also be blocked. However, the lock doesn't seem to lock across ASP.NET threads.

View 4 Replies

Web Forms :: Use Thread.sleep Method For A Particular Thread?

Aug 27, 2010

I want a example of multithreading .i want to use it in a web form not on console.i am using C#.net .and how to use thread.sleep method for a particular thread.

View 5 Replies

Trying To Refresh A Page Through A Thread?

Apr 3, 2010

So basically here I am trying to wait for my server to connect to my website signaling it that its done and so the page needs to be refreshed(cause sql was updated). Thing is when I try to use the response/request in the thread it simply doesn't want to work.

Here the code

Code:

[code]....

Errors I am getting are:

1. If I have the headers clear thing there it gives requires integrated IIS pipes or something like that.
2.If I don't have the clear headers it says the headers were already sent.

View 13 Replies

Signaling Web Page When ThreadPool Thread Is Completed?

Aug 25, 2010

From a web page I start a time consuming job and update it's status on the UI using webmethod.

Job is done in a thread:

ThreadPool.QueueUserWorkItem(new WaitCallback(DoJob), parameters); Job set's it status using static properties, and when web page, using javascript, calls web method it read those properties.

[System.Web.Services.WebMethod]
public static ProcessStatus GetProgressStatus()
{
Jober.Lock.EnterReadLock();
ProcessStatus st = new ProcessStatus(Jober.PercentageCompleted, Jober.TotalNumber);
Jober.Lock.ExitReadLock();
return st;
}

The UI progress is updated through javascript, the problem is that after thread completes I need to update UI on server side, so javascript won't help me here. What Is the best way to signal when thread is completed?

View 1 Replies

Thread Was Being Aborted In WebService And ASPX Page?

Jan 20, 2011

I'm having the Thread was being aborted exception in this simple code, running on IIS 6 when i run a long query.

[Code]....

View 1 Replies

Show One Single Thread And Its Replies On One Page?

Mar 29, 2011

i am making a forum , the problem which i am facing is that how to show a one single thread and its replys on one page ? i am using DataList.

View 2 Replies

Web Forms :: Render Page To String In Separate Thread?

Feb 24, 2010

I've got a page that I'm using as an e-mail template. I'd like to spin off a new thread, take the rendered page, and put it into an e-mail. Is this possible? If so, how? I haven't had luck so far.

View 3 Replies

Web Forms :: At Initial Page Load Start A Thread

Jun 17, 2010

I have an application that initially display 4 grid views at page load. This process takes 50-60 seconds and I would like to change the process to display the web page, show message like "Data being loaded, please wait..." and then spin off a thread that fills the various grid view. When this is done I would programatically like to do a post back to show the result. Not sure if this is possible? I tried something like this:

[Code]....

View 1 Replies

Create A 'thread' To Execute A Function On Page Load / Application Start?

Jan 10, 2011

I need to call a function everytime a visitor visits one of my website's page. But I do not want the execution of the function to interfere with the interface between the user and the website i.e. different thread. What is the best way to do that on ASP.Net?

View 3 Replies

AJAX :: AjaxControlToolkit.ToolKitScriptManager.OnInit() Throws Thread Abort Exception For Every Aspx Page

Nov 3, 2010

AjaxControlToolkit.ToolKitScriptManager.OnInit() throws thread abort exception for every aspx page. I have an asp.net 2.0 Ajax application, where I have set the following properties of ToolScriptManager on my pages.

<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="true"
EnableScriptLocalization="true" CombineScripts="true" EnablePageMethods="true">
<Scripts>

I have this configuration on all the aspx pages in my application. When I checked the .NET CLR exception Performance counter I figured out a large number of exceptions, mainly one exception per page load is occuring. On running windbg I was noticed that

AjaxControlToolkit.ToolKitScriptManager.OnInit() has the following code block which is getting executed. The OutputCombinedScriptFile() returns true. But since I am setting my controls on DesignTime still designmode is set to false for toolkitscriptmanager.

if (!DesignMode && (null != Context) && OutputCombinedScriptFile(Context))
{
// This was a combined script request that was satisfied; end all processing now
Page.Response.End();
}

I am not sure if this is a reported bug or even a bug with ajax, but this is causing havoc in my load test results as I have around 3 hundred thousand HTTP requests to be handled per day out of which 80% are aspx page requests resulting in a large number of threadafbortexceptions, thus affecting the performance.

View 3 Replies

Way To Attach To The Worker Process In VS

Jun 2, 2010

I'm using VS 2010. And in VS 2010 it's even more painful now to attach to the worker process when you want to test your local IIS site via IIS, not the VS built-in web server.It's more painful because now when you select the worker process () via the Debug Menu | Attach to Process | w3wp.exe it brings up an additional prompt asking if you're sure you want to do this.

View 1 Replies

Configuration :: Worker Process In IIS?

Nov 17, 2010

I have increased the number of worker process of default application pool to 15(IIS->Application Pools->DefaultAppPool->Properties->Performance->webgarden).after increasing the worker process i am facing session timeouts

My application is using a state server session managemnet and a predefined machineKeyCan you please guide me in how to increase the worker process without session loss

View 1 Replies

Iis - Web Garden - Max Worker Threads?

Oct 5, 2010

I'm investigating some performance improvements that can be made to our web server and ASP.NET application.This page contains a few things that we can do.We currently have two worker processes running as a garden. Do each of these worker processes have their own ASP.NET threadpool? Or do both of these worker processes share a single threadpool and the max number of worker threads is shared across these processes?This post seems to suggest that the two processes share a common ASP.NET threadpool. All w3wp.exe threads do is take requests from HTTP.SYS queue, process it, and hand the request toASPNET_ISAPI.DLL, who then deposits those requests into the ASP.Net request queue, and the ASP.Net threadsBut this post suggests that each worker process contains their own ASP.NET threadpool. Each process (w3wp.exe) has its own CLR thread pool which has the configured maxworkerthreads value (20 default).

View 1 Replies

AJAX :: Update Panel In Master Page Is Affecting Another Update Panel In Child Page?

Aug 4, 2010

i have my master page with one update panel working like a banner, so when the timer do tick every 5 sec

the image change. That works fine, but i have an update panel in my index page, this update panel works with some buttons that change the text inside the panel when click.

Now, the problem.

When i click one button to change the text and the banner change, the text returns to his default text. The update in master page is affecting the update on index page.

View 2 Replies

Application Can Work With More Than One Worker Process

Jan 24, 2011

In IIS application pool I have set 2 in maximum worker process in process model, will application object, session object and cache object will be shared by the all worker process or will all worker process have different application object, session object and cache object.

View 1 Replies







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