I'm developing a website which at one point has a hefty amount of data
processing to do. I delegate this to a separate thread and on the results
page do an auto-refresh every few seconds until the results are available.
In my thread I take a reference to the page that invoked the thread, so that
I can get access to the session object. The thread writes to the session to
indicate that it has finished. This all worked fine, until I decided to
switch from InProc to StateServer. Whilst I don't get any errors, it behaves
as though the session object my thread is referencing is different to the
one that my results page is referencing and my communications therefore
don't work any more.
So, my question is, what is the best way for a thread to get access to the
current session object?
(I'm sure it should be sooo easy but ....)
thanks in advance,
Brian. 4 1041
Brian,
I am not sure if I understand you, however if I do.
I don't see the sence of what you are doing, you are creating probably a
bunch of overhead to tell the client that he has to watch what is mostly
done by a WaitCursor.
However your pages are stateless, which means that as soon that you do the
sent, the page is gone out of memory, with all that belongs to him except
the session information, his extra threads are left alone.
Maybe can you do what you want by creating an extra windowservice or
webservice which than can return the information because of a session.id
As I said, be aware that you are creating a bunch of overhead, where your
user has to wait for. A webserver is not a one to one operating process, it
should be able to handle an enormous amount of clients.
I hope this gives some idea's,
Cor
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:OY******** ******@TK2MSFTN GP10.phx.gbl... Brian,
I am not sure if I understand you, however if I do.
I don't see the sence of what you are doing, you are creating probably a bunch of overhead to tell the client that he has to watch what is mostly done by a WaitCursor.
However your pages are stateless, which means that as soon that you do the sent, the page is gone out of memory, with all that belongs to him except the session information, his extra threads are left alone.
Maybe can you do what you want by creating an extra windowservice or webservice which than can return the information because of a session.id
As I said, be aware that you are creating a bunch of overhead, where your user has to wait for. A webserver is not a one to one operating process, it should be able to handle an enormous amount of clients.
I hope this gives some idea's,
Cor
I don't mean to appear dense, but how does one implement a WaitCursor for a
web page? I've only seen it used on desktop applications (where session
isn't an issue anyway).
thanks,
Brian.
Brian,
AFAIK is in in most cases (there are exceptions) in ASPNET automatic when
the page is waiting for a postback.
Cor
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:OS******** ******@TK2MSFTN GP09.phx.gbl... Brian,
AFAIK is in in most cases (there are exceptions) in ASPNET automatic when the page is waiting for a postback.
Cor
Never seen it, and I don't want to risk the browser timing out. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Joshua Beall |
last post by:
Hi All,
What is the best way to use a cookie to remember a logged in user? Would
you store the username and password in two separate cookies? Should the
password be plain text? Hashed? Not there at all?
Any feedback would be helpful. Thanks!
-Josh
|
by: R. Rajesh Jeba Anbiah |
last post by:
-----------------------------------------------------------------
This is the FAQ thread where the FAQ compilation project goes.
* If you wish to improve the contents, please copy the whole content,
fix it and then post it. When posting, please change the revision
number (increase by 1) in the subject line.
* If you want to comment, do it without changing the subject line.
* Do NOT add new question and answers here. Add here *only* after...
|
by: Tony Proctor |
last post by:
Hi everyone
We're experiencing some serious anomalies with the scheduling of ASP
threads. I'd be interested to hear if anyone knows what algorithm is used
(e.g. simple round-robin, or something more sophisticated), and what
situations might perturb it. Even a hint as to what would be considered
normal scheduling might help.
The root of our problem is that we observed a normally well-behaved web
application suddenly limit itself to a...
|
by: Stephen Brown |
last post by:
We've been using dotNet for a couple of years now and have been updating our
live server by just overwriting (Explorer drag and drop) the aspx and
assembly files until we had some errors reported to us a couple of months
ago that some clients received application server errors at the moment we
updated (if I remember correctly, they were sharing or process in use
errrors). Since then, we've been paranoid about ensuring that there is no...
|
by: Rudy |
last post by:
Hello!
I currently have a site online. I added more features to my datagrid page,
so users can update and stuff. I though I could just copy the aspx, aspx.vb
and the server page including the web config, and paste then on the server.
At c:\intepub\wwwroot\website.
But now I get a runtime error when I go to that page. What is the best way
to update a site after maiking modifications on the developer machine?
TIA
| |
by: anassar |
last post by:
I have an ASP.Net Web Application where I depended on Sessions to share
information across the code. One of the buttons the user clicked, take
a long time to process. So, I started multi-threading the function
behind that button, but then I hit a brick wall - the new thread has no
access to Context.Current and therefore cannot see the Session
variables.
I understand why threads should not depend on Context.Current as they
can outlive...
|
by: Diffident |
last post by:
Hi All,
I am trying to perform a non-CPU bound operation in an asynchronous fashion
using 'Thread' and a delegate. Basically, I am spawning a thread using
ThreadStart and Thread.
My non-CPU bound operation needs to have access to Session variables; Even
though I embedded the state information (which also includes the context
object) in an object and passed the object to the Thread , I am unable to
access the Session variables. The...
|
by: fniles |
last post by:
I am using VB.NET 2003 and a socket control to receive and sending data to
clients.
As I receive data in 1 thread, I put it into an arraylist, and then I remove
the data from arraylist and send it to the client.
Before adding data to the arraylist, I check if the depth of the arraylist
is longer than iMaxQueueDepth, and if it is, I clear the arraylist.
Is it possible that while I am clearing the arraylist, the ThreadMain at the
same time...
|
by: sirdavethebrave |
last post by:
Hi guys -
I have written a form, and a stored procedure to update the said form.
It really is as simple as that. A user can go into the form, update some fields and hit the update button to update the information which is stored in a SQL database.
In testing we noticed that the form was updating correctly but the update mechanism was also updating the first record of the table in the sql database every time. No error messages are on...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |