473,385 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

threading and session object

Hello

I am starting a new thread in a button click event.

This thread calls an method which sends emails, I don't want the page
to wait for the emails to finish going out as it slows the user down.

I have to set a session to null in the same click method but when
I do this I get this funny error.

"An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
Unknown Module.

Additional information: The type System.Web.HttpException in Assembly
System.Web, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a is not marked as serializable."

Here is a rough example of the code. There is no difference if I move
the Session=null
statement before or after the thread, or if I move the email code into
a separate class.

private void MultipleAttachEmail_Click(object sender, System.EventArgs
e)
{
ThreadStart ts = new ThreadStart(multipleMail);
Thread thread = new Thread(ts);
thread.Start();
Session["BasketSession"] = null;
Response.Redirect("DocBasketCheckout.aspx?%^="+Ema ilAddress.Text);
}

private void multipleMail ()
{
MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "we*****@crash.com";
msgMail.Subject = "Document Basket Contents";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";

// Gets document location path from Document Basket.
foreach(DataGridItem dgi in documentDataGrid.Items)
{
string dLink = baseURL + dgi.Cells[2].Text;
msgMail.Attachments.Add(new MailAttachment(Server.MapPath( dLink
)));
}
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);
}
Nov 18 '05 #1
8 1024
Hi Matt,

This is not directly addressing your question, but I think it might very
well be related.

You'll want to be real careful with threads in this scenario. I think the
failure you're seeing might have nothing to do with clearing the session but
something that's failing inside that thread method (for example the DataGrid
access).

The problem here is that when you fire off a new thread and you point it at
the method in question the class that it belongs to or some of hte
components on it might no longer be there because the page and the class
that goes with it has terminated already. One thing you can do work around
this is a use a static method.

In your scenario I would probably build the message on the ASP.Net thread
(because it relies on some data from the page) and fire only the sending on
the new thread and stick that into a generic static method. IOW, minimize
the reliance of the thread method on anything from the main ASP.Net page
which may be terminated/ing when the thread executes.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"MattB" <MB*********@yahoo.co.uk> wrote in message
news:b4**************************@posting.google.c om...
Hello

I am starting a new thread in a button click event.

This thread calls an method which sends emails, I don't want the page
to wait for the emails to finish going out as it slows the user down.

I have to set a session to null in the same click method but when
I do this I get this funny error.

"An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
Unknown Module.

Additional information: The type System.Web.HttpException in Assembly
System.Web, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a is not marked as serializable."

Here is a rough example of the code. There is no difference if I move
the Session=null
statement before or after the thread, or if I move the email code into
a separate class.

private void MultipleAttachEmail_Click(object sender, System.EventArgs
e)
{
ThreadStart ts = new ThreadStart(multipleMail);
Thread thread = new Thread(ts);
thread.Start();
Session["BasketSession"] = null;
Response.Redirect("DocBasketCheckout.aspx?%^="+Ema ilAddress.Text);
}

private void multipleMail ()
{
MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "we*****@crash.com";
msgMail.Subject = "Document Basket Contents";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";

// Gets document location path from Document Basket.
foreach(DataGridItem dgi in documentDataGrid.Items)
{
string dLink = baseURL + dgi.Cells[2].Text;
msgMail.Attachments.Add(new MailAttachment(Server.MapPath( dLink
)));
}
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);
}

Nov 18 '05 #2
Another possible way, is to store all data relevant to the thread operation,
in a value type, and pass it by value to the method.
Thus copying the relevant data.
Sharon.
"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Matt,

This is not directly addressing your question, but I think it might very
well be related.

You'll want to be real careful with threads in this scenario. I think the
failure you're seeing might have nothing to do with clearing the session but something that's failing inside that thread method (for example the DataGrid access).

The problem here is that when you fire off a new thread and you point it at the method in question the class that it belongs to or some of hte
components on it might no longer be there because the page and the class
that goes with it has terminated already. One thing you can do work around
this is a use a static method.

In your scenario I would probably build the message on the ASP.Net thread
(because it relies on some data from the page) and fire only the sending on the new thread and stick that into a generic static method. IOW, minimize
the reliance of the thread method on anything from the main ASP.Net page
which may be terminated/ing when the thread executes.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"MattB" <MB*********@yahoo.co.uk> wrote in message
news:b4**************************@posting.google.c om...
Hello

I am starting a new thread in a button click event.

This thread calls an method which sends emails, I don't want the page
to wait for the emails to finish going out as it slows the user down.

I have to set a session to null in the same click method but when
I do this I get this funny error.

"An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
Unknown Module.

Additional information: The type System.Web.HttpException in Assembly
System.Web, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a is not marked as serializable."

Here is a rough example of the code. There is no difference if I move
the Session=null
statement before or after the thread, or if I move the email code into
a separate class.

private void MultipleAttachEmail_Click(object sender, System.EventArgs
e)
{
ThreadStart ts = new ThreadStart(multipleMail);
Thread thread = new Thread(ts);
thread.Start();
Session["BasketSession"] = null;
Response.Redirect("DocBasketCheckout.aspx?%^="+Ema ilAddress.Text);
}

private void multipleMail ()
{
MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "we*****@crash.com";
msgMail.Subject = "Document Basket Contents";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";

// Gets document location path from Document Basket.
foreach(DataGridItem dgi in documentDataGrid.Items)
{
string dLink = baseURL + dgi.Cells[2].Text;
msgMail.Attachments.Add(new MailAttachment(Server.MapPath( dLink
)));
}
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);
}


Nov 18 '05 #3
Not exactly. The error here is that this line

// Gets document location path from Document Basket.
foreach(DataGridItem dgi in documentDataGrid.Items)

is contained inside the thread code. and it operates on the datagrid. the
datagrid is owned by the main thread. A child thread cannot touch a main
thread's object in a thread safe manner. If this were a winforms
application, the fix would imply calling control.Invoke. Sadly, this is not
available in the webforms architecture. Typically, this call will work about
40 - 50 percent of the time on a NT architecture and even higher on pre NT
architectures, but it is still wrong and rightly avoided. The work around is
to not manipulate the datagrid inside the thread. A more sophisticated
technique of passing in the reference to the datagrid to the thread exists
but it isn't exactly warranted here.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Matt,

This is not directly addressing your question, but I think it might very
well be related.

You'll want to be real careful with threads in this scenario. I think the
failure you're seeing might have nothing to do with clearing the session
but
something that's failing inside that thread method (for example the
DataGrid
access).

The problem here is that when you fire off a new thread and you point it
at
the method in question the class that it belongs to or some of hte
components on it might no longer be there because the page and the class
that goes with it has terminated already. One thing you can do work around
this is a use a static method.

In your scenario I would probably build the message on the ASP.Net thread
(because it relies on some data from the page) and fire only the sending
on
the new thread and stick that into a generic static method. IOW, minimize
the reliance of the thread method on anything from the main ASP.Net page
which may be terminated/ing when the thread executes.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"MattB" <MB*********@yahoo.co.uk> wrote in message
news:b4**************************@posting.google.c om...
Hello

I am starting a new thread in a button click event.

This thread calls an method which sends emails, I don't want the page
to wait for the emails to finish going out as it slows the user down.

I have to set a session to null in the same click method but when
I do this I get this funny error.

"An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
Unknown Module.

Additional information: The type System.Web.HttpException in Assembly
System.Web, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a is not marked as serializable."

Here is a rough example of the code. There is no difference if I move
the Session=null
statement before or after the thread, or if I move the email code into
a separate class.

private void MultipleAttachEmail_Click(object sender, System.EventArgs
e)
{
ThreadStart ts = new ThreadStart(multipleMail);
Thread thread = new Thread(ts);
thread.Start();
Session["BasketSession"] = null;
Response.Redirect("DocBasketCheckout.aspx?%^="+Ema ilAddress.Text);
}

private void multipleMail ()
{
MailMessage msgMail = new MailMessage();
msgMail.To = EmailAddress.Text;
msgMail.From = "we*****@crash.com";
msgMail.Subject = "Document Basket Contents";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";

// Gets document location path from Document Basket.
foreach(DataGridItem dgi in documentDataGrid.Items)
{
string dLink = baseURL + dgi.Cells[2].Text;
msgMail.Attachments.Add(new MailAttachment(Server.MapPath( dLink
)));
}
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(msgMail);
}


Nov 18 '05 #4
Hi Alvin,

You're right of course and that's sort of what I was getting at <g>...

In this case though I'm certain that the problem is that hte page is gone by
the time the thread fires up. Matt does a Redirect() immediately following
the Thread creation which exits the page and recylces the thread. This is
likely to happen way before the new thread even starts. So if there's any
reliance on anything from the ASP page it's not likely to be there.

I've run into this in a few of my own applications and it's really a bitch
to catch if you don't know this is happening because in most cases you don't
get a failure in teh ASP.Net page because *it* completed fine. The exception
happens on another thread unknown to the ASP.Net runtime and thus you get no
messages. The thread falls down and goes away and you get an eventlog entry
for this, but otherwise nothing.

In general I would say this is a bad idea unless you always force your state
to the thread object itself and/or you call fully selfcontained static code.

Another possibly better alternative is to use Asynchronous Requests...

+++ Rick ---
Nov 18 '05 #5
maybe this way will work:

aspx page
=========
<%@ Page Language="cs" %>
<%@ import namespace="System.Threading" %>
<%@ import namespace="test" %>

<%
string[] passArr = new string[2]{"arr val 1", "arr val 2"};

ThreadProc tp = new ThreadProc(passArr);
Thread t = new Thread(new ThreadStart(tp.ThreadProcStart));
t.Start();
%>
<html>
<head>
</head>
<body>
</body>
</html>

thread class
==========
using System.Threading;
using System.IO;

namespace test
{
public class ThreadProc
{
private string[] m_dispStrArr;

public ThreadProc(string[] inStrArr) {
m_dispStrArr = inStrArr;
}

public void ThreadProcStart() {
for (int i = 0; i < 20; i++)
{
StreamWriter fsw =
File.AppendText(System.AppDomain.CurrentDomain.Bas eDirectory + "\\log.txt");
fsw.WriteLine("m_dispStr: " + m_dispStrArr[0] + " " + m_dispStrArr[1]
+ " i: " + i);
fsw.Close();
fsw = null;

Thread.Sleep(1000);
}
}
}
}

it works but, maybe you can find a flaw?
"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi Alvin,

You're right of course and that's sort of what I was getting at <g>...

In this case though I'm certain that the problem is that hte page is gone by the time the thread fires up. Matt does a Redirect() immediately following
the Thread creation which exits the page and recylces the thread. This is
likely to happen way before the new thread even starts. So if there's any
reliance on anything from the ASP page it's not likely to be there.

I've run into this in a few of my own applications and it's really a bitch
to catch if you don't know this is happening because in most cases you don't get a failure in teh ASP.Net page because *it* completed fine. The exception happens on another thread unknown to the ASP.Net runtime and thus you get no messages. The thread falls down and goes away and you get an eventlog entry for this, but otherwise nothing.

In general I would say this is a bad idea unless you always force your state to the thread object itself and/or you call fully selfcontained static code.
Another possibly better alternative is to use Asynchronous Requests...

+++ Rick ---

Nov 18 '05 #6
well as rick pointed out, the other issue is that by the time the thread is
finished, the page is gone. I've seen others put a sleep in the main page or
a join to force the main thread to wait on the child thread to execute.
Infact, i've used the join which seems to work well.

Even in OP's case, the thread is still touching the response object which is
a main thread object.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Sharon" <ta*******@hotmail.com> wrote in message
news:eC**************@TK2MSFTNGP10.phx.gbl...
maybe this way will work:

aspx page
=========
<%@ Page Language="cs" %>
<%@ import namespace="System.Threading" %>
<%@ import namespace="test" %>

<%
string[] passArr = new string[2]{"arr val 1", "arr val 2"};

ThreadProc tp = new ThreadProc(passArr);
Thread t = new Thread(new ThreadStart(tp.ThreadProcStart));
t.Start();
%>
<html>
<head>
</head>
<body>
</body>
</html>

thread class
==========
using System.Threading;
using System.IO;

namespace test
{
public class ThreadProc
{
private string[] m_dispStrArr;

public ThreadProc(string[] inStrArr) {
m_dispStrArr = inStrArr;
}

public void ThreadProcStart() {
for (int i = 0; i < 20; i++)
{
StreamWriter fsw =
File.AppendText(System.AppDomain.CurrentDomain.Bas eDirectory +
"\\log.txt");
fsw.WriteLine("m_dispStr: " + m_dispStrArr[0] + " " + m_dispStrArr[1]
+ " i: " + i);
fsw.Close();
fsw = null;

Thread.Sleep(1000);
}
}
}
}

it works but, maybe you can find a flaw?
"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi Alvin,

You're right of course and that's sort of what I was getting at <g>...

In this case though I'm certain that the problem is that hte page is gone

by
the time the thread fires up. Matt does a Redirect() immediately
following
the Thread creation which exits the page and recylces the thread. This is
likely to happen way before the new thread even starts. So if there's any
reliance on anything from the ASP page it's not likely to be there.

I've run into this in a few of my own applications and it's really a
bitch
to catch if you don't know this is happening because in most cases you

don't
get a failure in teh ASP.Net page because *it* completed fine. The

exception
happens on another thread unknown to the ASP.Net runtime and thus you get

no
messages. The thread falls down and goes away and you get an eventlog

entry
for this, but otherwise nothing.

In general I would say this is a bad idea unless you always force your

state
to the thread object itself and/or you call fully selfcontained static

code.

Another possibly better alternative is to use Asynchronous Requests...

+++ Rick ---


Nov 18 '05 #7
Thanks for all the feedback.

Decoupling - I guess thats the word for it - the datagrid from the
main thread and filling a separate string array or arraylist to pass
to a separate email class did the trick. I cannot wait in my asp.net
page codebehind to wait for a thread.join. My only remaining query is
there anything I should do in the separate email class to close the
thread, I assume garbage collection will take care of this
anyhow....Also maybe I could start the thread in the separate email
class..

here is current code sample...

private void MultipleAttachEmail_Click(object sender, System.EventArgs
e)
{
foreach(DataGridItem dgi in documentDataGrid.Items)
{
attachments.Add(Server.MapPath(baseURL + dgi.Cells[2].Text));
}
DocumentsEmail dem = new
DocumentsEmail(attachments,EmailAddress.Text);
ThreadStart ts = new ThreadStart(dem.SendMultipleAttachEmail);
thread = new System.Threading.Thread(ts);
thread.Start();
Session["BasketSession"] = null;
Response.Redirect("DocBasketCheckout.aspx?%^="+Ema ilAddress.Text);
}

the new DocumentsEmail class

using System;
using System.Collections;
using System.Threading;
using System.Web.Mail;
using System.Web;

namespace Org.Web.UI
{
public class DocumentsEmail
{
private ArrayList _intArrList;
private string _email;

public DocumentsEmail(ArrayList inArrList, string inEmail)
{
_intArrList = inArrList;
_email = inEmail;
}

public void SendMultipleAttachEmail()
{
MailMessage msgMail = new MailMessage();
msgMail.To = _email;
msgMail.From = "Org Website" + " <we*****@org.co.uk>";
msgMail.Subject = "Your Documents";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = " ";

// Gets document location path from Document Basket.
foreach(string dgi in _intArrList)
{
msgMail.Attachments.Add(new MailAttachment(dgi));
}

SmtpMail.SmtpServer = "192.168.0.253";
SmtpMail.Send(msgMail);
}
}

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:<#z**************@TK2MSFTNGP12.phx.gbl>...
well as rick pointed out, the other issue is that by the time the thread is
finished, the page is gone. I've seen others put a sleep in the main page or
a join to force the main thread to wait on the child thread to execute.
Infact, i've used the join which seems to work well.

Even in OP's case, the thread is still touching the response object which is
a main thread object.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Sharon" <ta*******@hotmail.com> wrote in message
news:eC**************@TK2MSFTNGP10.phx.gbl...
maybe this way will work:

aspx page
=========
<%@ Page Language="cs" %>
<%@ import namespace="System.Threading" %>
<%@ import namespace="test" %>

<%
string[] passArr = new string[2]{"arr val 1", "arr val 2"};

ThreadProc tp = new ThreadProc(passArr);
Thread t = new Thread(new ThreadStart(tp.ThreadProcStart));
t.Start();
%>
<html>
<head>
</head>
<body>
</body>
</html>

thread class
==========
using System.Threading;
using System.IO;

namespace test
{
public class ThreadProc
{
private string[] m_dispStrArr;

public ThreadProc(string[] inStrArr) {
m_dispStrArr = inStrArr;
}

public void ThreadProcStart() {
for (int i = 0; i < 20; i++)
{
StreamWriter fsw =
File.AppendText(System.AppDomain.CurrentDomain.Bas eDirectory +
"\\log.txt");
fsw.WriteLine("m_dispStr: " + m_dispStrArr[0] + " " + m_dispStrArr[1]
+ " i: " + i);
fsw.Close();
fsw = null;

Thread.Sleep(1000);
}
}
}
}

it works but, maybe you can find a flaw?
"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi Alvin,

You're right of course and that's sort of what I was getting at <g>...

In this case though I'm certain that the problem is that hte page is gone by the time the thread fires up. Matt does a Redirect() immediately
following
the Thread creation which exits the page and recylces the thread. This is
likely to happen way before the new thread even starts. So if there's any
reliance on anything from the ASP page it's not likely to be there.

I've run into this in a few of my own applications and it's really a
bitch
to catch if you don't know this is happening because in most cases you don't get a failure in teh ASP.Net page because *it* completed fine. The exception happens on another thread unknown to the ASP.Net runtime and thus you get no messages. The thread falls down and goes away and you get an eventlog entry for this, but otherwise nothing.

In general I would say this is a bad idea unless you always force your state to the thread object itself and/or you call fully selfcontained static code.
Another possibly better alternative is to use Asynchronous Requests...

+++ Rick ---


Nov 18 '05 #8
i think a separate class will work because the aspx instance
is holding reference to the array, and is passing that reference to the
class.
when the aspx is gone, the reference will no longer exist,
but the array data in the heap will still exist because the thread class is
still holding
reference to it.
when the thread class finishes execution, the array data will be collected.
true?

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
well as rick pointed out, the other issue is that by the time the thread is finished, the page is gone. I've seen others put a sleep in the main page or a join to force the main thread to wait on the child thread to execute.
Infact, i've used the join which seems to work well.

Even in OP's case, the thread is still touching the response object which is a main thread object.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Sharon" <ta*******@hotmail.com> wrote in message
news:eC**************@TK2MSFTNGP10.phx.gbl...
maybe this way will work:

aspx page
=========
<%@ Page Language="cs" %>
<%@ import namespace="System.Threading" %>
<%@ import namespace="test" %>

<%
string[] passArr = new string[2]{"arr val 1", "arr val 2"};

ThreadProc tp = new ThreadProc(passArr);
Thread t = new Thread(new ThreadStart(tp.ThreadProcStart));
t.Start();
%>
<html>
<head>
</head>
<body>
</body>
</html>

thread class
==========
using System.Threading;
using System.IO;

namespace test
{
public class ThreadProc
{
private string[] m_dispStrArr;

public ThreadProc(string[] inStrArr) {
m_dispStrArr = inStrArr;
}

public void ThreadProcStart() {
for (int i = 0; i < 20; i++)
{
StreamWriter fsw =
File.AppendText(System.AppDomain.CurrentDomain.Bas eDirectory +
"\\log.txt");
fsw.WriteLine("m_dispStr: " + m_dispStrArr[0] + " " + m_dispStrArr[1] + " i: " + i);
fsw.Close();
fsw = null;

Thread.Sleep(1000);
}
}
}
}

it works but, maybe you can find a flaw?
"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi Alvin,

You're right of course and that's sort of what I was getting at <g>...

In this case though I'm certain that the problem is that hte page is gone
by
the time the thread fires up. Matt does a Redirect() immediately
following
the Thread creation which exits the page and recylces the thread. This
is likely to happen way before the new thread even starts. So if there's any reliance on anything from the ASP page it's not likely to be there.

I've run into this in a few of my own applications and it's really a
bitch
to catch if you don't know this is happening because in most cases you

don't
get a failure in teh ASP.Net page because *it* completed fine. The

exception
happens on another thread unknown to the ASP.Net runtime and thus you

get no
messages. The thread falls down and goes away and you get an eventlog

entry
for this, but otherwise nothing.

In general I would say this is a bad idea unless you always force your

state
to the thread object itself and/or you call fully selfcontained static

code.

Another possibly better alternative is to use Asynchronous Requests...

+++ Rick ---



Nov 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Roberto López | last post by:
Hi, I´m doing an asp.net application that uploads and downloads files and folders between the client and the server on my intranet. To do this I have create threads and it runs Ok but I need to...
2
by: al | last post by:
Greeting, I have this sub in a page that runs a thread to change direction of a page then redirects to a new page(please wait message page)which checks for a global flag and returns to previous...
8
by: MattB | last post by:
Hello I am starting a new thread in a button click event. This thread calls an method which sends emails, I don't want the page to wait for the emails to finish going out as it slows the user...
1
by: Alex Brown | last post by:
We are switching from InProc mode to StateServer mode and have a somewhat unusual problem that I have not seen discussed. Sometime we pass the session object to a thread by reference and the...
4
by: Makarand Keer | last post by:
Hi All I have problem in using Threading. I have ASP.NET application in which I am using multithreading to start a process. Now the object instances which are used in this thread access...
2
by: Gavin Lyons via .NET 247 | last post by:
Hello, I'm writing a newsletter application which uses backgroundthreading. I'm using Session variable to report on progresswhile it loops through a dataset. The 'Status.aspx' pagerefreshes every...
10
by: jt | last post by:
The program works like this: There is a form with a button. When the form is loaded, a separate thread is started which is retreiving/updating data in the database every x seconds. When clicked...
2
by: Jeremy Cowles | last post by:
Hi all, Here is the issue: On postback, I spawn a new thread using the following code: Dim NewThread As New Thread(AddressOf ProcessFile) NewThread.Priority = ThreadPriority.Lowest...
10
by: Janto Dreijer | last post by:
I have been having problems with the Python 2.4 and 2.5 interpreters on both Linux and Windows crashing on me. Unfortunately it's rather complex code and difficult to pin down the source. So...
7
by: darrel | last post by:
This is a long-overdue item on my punch list that I haven't had much time to address in the past. I'm trying to get it off my plate this week. ;o) We have a home-grown CMS that works pretty well....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.