473,772 Members | 3,786 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time consuming requests in .NET

Hello,

I have the following problem:

In my ASPX page is a button called "Import". The action of this button is to
import a set of data in my database. I have to import big datasets and this
opperation is time consuming (aproximativell y 3-4 hours).
After an hour my page display the error:

"The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be
experiencing technical difficulties, or you may need to adjust your browser
settings.
............... ..
............... .
Cannot find server or DNS Error
Internet Explorer "
But behind the scene my import is still working even i received this error
(i executed statement like "select count(*) from myImportedTable " and the
total number of imported rows still raise even my browser is dispaying this
error).

I modified the following timeout setting to hugh values to hope fix this
problem but without any result

1. in my web.config file
<authenticati on mode="Forms">
<forms name=".HRPAUTH" loginUrl="login .aspx" protection="All "
timeout="900"></forms>
</authentication>

<sessionState cookieless="fal se" timeout="1200" mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= " />

2. in my machine.config file
<processModel
enable="true"
timeout="Infini te"
idleTimeout="In finite"
shutdownTimeout ="0:00:05"
requestLimit="I nfinite"
requestQueueLim it="5000"
restartQueueLim it="10"
memoryLimit="10 0"
webGarden="fals e"
cpuMask="0xffff ffff"
userName="machi ne"
password="AutoG enerate"
logLevel="Error s"
clientConnected Check="0:00:05"
comAuthenticati onLevel="Connec t"
comImpersonatio nLevel="Imperso nate"
responseDeadloc kInterval="10:1 0:00"
maxWorkerThread s="25"
maxIoThreads="2 5"
/>

Your help is appreciated!
Thanks
Nov 17 '05 #1
9 2144
I think your going about this the wrong way. Instead of trying to get the
page's timeout to keep up with the time-intensive operation you should try
to get the page to initially start the process and then have a method to
check the current status of your import. Each time you come to the page
afterwards you will see a progress update using this method call. That way
you could also see how far the import has gotten to, which can be useful
also if you run into errors halfway through an import.
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:uG******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I have the following problem:

In my ASPX page is a button called "Import". The action of this button is to import a set of data in my database. I have to import big datasets and this opperation is time consuming (aproximativell y 3-4 hours).
After an hour my page display the error:

"The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.
............... .
...............
Cannot find server or DNS Error
Internet Explorer "
But behind the scene my import is still working even i received this error
(i executed statement like "select count(*) from myImportedTable " and the
total number of imported rows still raise even my browser is dispaying this error).

I modified the following timeout setting to hugh values to hope fix this
problem but without any result

1. in my web.config file
<authenticati on mode="Forms">
<forms name=".HRPAUTH" loginUrl="login .aspx" protection="All "
timeout="900"></forms>
</authentication>

<sessionState cookieless="fal se" timeout="1200" mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= " />

2. in my machine.config file
<processModel
enable="true"
timeout="Infini te"
idleTimeout="In finite"
shutdownTimeout ="0:00:05"
requestLimit="I nfinite"
requestQueueLim it="5000"
restartQueueLim it="10"
memoryLimit="10 0"
webGarden="fals e"
cpuMask="0xffff ffff"
userName="machi ne"
password="AutoG enerate"
logLevel="Error s"
clientConnected Check="0:00:05"
comAuthenticati onLevel="Connec t"
comImpersonatio nLevel="Imperso nate"
responseDeadloc kInterval="10:1 0:00"
maxWorkerThread s="25"
maxIoThreads="2 5"
/>

Your help is appreciated!
Thanks

Nov 17 '05 #2
Thanx for your response Janaka. How can i implement this behavior, to start
the process of import and the same time to receive the postback of my page
(the response from the server)? Can you help me?

"Janaka" <ja****@magical ia.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I think your going about this the wrong way. Instead of trying to get the
page's timeout to keep up with the time-intensive operation you should try
to get the page to initially start the process and then have a method to
check the current status of your import. Each time you come to the page
afterwards you will see a progress update using this method call. That way you could also see how far the import has gotten to, which can be useful
also if you run into errors halfway through an import.
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:uG******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I have the following problem:

In my ASPX page is a button called "Import". The action of this button is
to
import a set of data in my database. I have to import big datasets and this
opperation is time consuming (aproximativell y 3-4 hours).
After an hour my page display the error:

"The page cannot be displayed
The page you are looking for is currently unavailable. The Web site

might be
experiencing technical difficulties, or you may need to adjust your

browser
settings.
............... .
...............
Cannot find server or DNS Error
Internet Explorer "
But behind the scene my import is still working even i received this

error (i executed statement like "select count(*) from myImportedTable " and the total number of imported rows still raise even my browser is dispaying

this
error).

I modified the following timeout setting to hugh values to hope fix this
problem but without any result

1. in my web.config file
<authenticati on mode="Forms">
<forms name=".HRPAUTH" loginUrl="login .aspx" protection="All "
timeout="900"></forms>
</authentication>

<sessionState cookieless="fal se" timeout="1200" mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= " />

2. in my machine.config file
<processModel
enable="true"
timeout="Infini te"
idleTimeout="In finite"
shutdownTimeout ="0:00:05"
requestLimit="I nfinite"
requestQueueLim it="5000"
restartQueueLim it="10"
memoryLimit="10 0"
webGarden="fals e"
cpuMask="0xffff ffff"
userName="machi ne"
password="AutoG enerate"
logLevel="Error s"
clientConnected Check="0:00:05"
comAuthenticati onLevel="Connec t"
comImpersonatio nLevel="Imperso nate"
responseDeadloc kInterval="10:1 0:00"
maxWorkerThread s="25"
maxIoThreads="2 5"
/>

Your help is appreciated!
Thanks


Nov 17 '05 #3
Well it depends on what your actual application is going to do. Can you
describe the import process that is currently in place.
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Thanx for your response Janaka. How can i implement this behavior, to start the process of import and the same time to receive the postback of my page
(the response from the server)? Can you help me?

"Janaka" <ja****@magical ia.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I think your going about this the wrong way. Instead of trying to get the
page's timeout to keep up with the time-intensive operation you should try to get the page to initially start the process and then have a method to
check the current status of your import. Each time you come to the page
afterwards you will see a progress update using this method call. That

way
you could also see how far the import has gotten to, which can be useful
also if you run into errors halfway through an import.
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:uG******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I have the following problem:

In my ASPX page is a button called "Import". The action of this button

is
to
import a set of data in my database. I have to import big datasets and

this
opperation is time consuming (aproximativell y 3-4 hours).
After an hour my page display the error:

"The page cannot be displayed
The page you are looking for is currently unavailable. The Web site

might
be
experiencing technical difficulties, or you may need to adjust your

browser
settings.
............... .
...............
Cannot find server or DNS Error
Internet Explorer "
But behind the scene my import is still working even i received this

error (i executed statement like "select count(*) from myImportedTable " and the total number of imported rows still raise even my browser is dispaying

this
error).

I modified the following timeout setting to hugh values to hope fix this problem but without any result

1. in my web.config file
<authenticati on mode="Forms">
<forms name=".HRPAUTH" loginUrl="login .aspx" protection="All "
timeout="900"></forms>
</authentication>

<sessionState cookieless="fal se" timeout="1200" mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data source=127.0.0. 1;user id=sa;password= " />

2. in my machine.config file
<processModel
enable="true"
timeout="Infini te"
idleTimeout="In finite"
shutdownTimeout ="0:00:05"
requestLimit="I nfinite"
requestQueueLim it="5000"
restartQueueLim it="10"
memoryLimit="10 0"
webGarden="fals e"
cpuMask="0xffff ffff"
userName="machi ne"
password="AutoG enerate"
logLevel="Error s"
clientConnected Check="0:00:05"
comAuthenticati onLevel="Connec t"
comImpersonatio nLevel="Imperso nate"
responseDeadloc kInterval="10:1 0:00"
maxWorkerThread s="25"
maxIoThreads="2 5"
/>

Your help is appreciated!
Thanks



Nov 17 '05 #4
The event of my import button looks like

Private Sub buttonImport_Se rverClick(ByVal sender As System.Object,
ByVal e As System.EventArg s) Handles buttonImport.Se rverClick
Dim oImportData As ImportData
Try
oImportData = New ImportData(some parameters)
oImportData.Sta rtImport()
Catch ex As Exception
' Do something
Finally
' Do something
End Try
End Sub

So from your explanation i understand that i have to do some modifications
in my code to do StartImport an asyncronous method (i dont know how i can
make this). After that i have to preserve the oImportData object across
multiple requests of this page (probably at Application level) and to use it
to check the status of import process on subsequent request of the import
page.
"Janaka" <ja****@magical ia.com> wrote in message
news:ub******** ******@TK2MSFTN GP11.phx.gbl...
Well it depends on what your actual application is going to do. Can you
describe the import process that is currently in place.
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Thanx for your response Janaka. How can i implement this behavior, to

start
the process of import and the same time to receive the postback of my page
(the response from the server)? Can you help me?

"Janaka" <ja****@magical ia.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I think your going about this the wrong way. Instead of trying to get the page's timeout to keep up with the time-intensive operation you should try to get the page to initially start the process and then have a method to check the current status of your import. Each time you come to the page afterwards you will see a progress update using this method call. That way
you could also see how far the import has gotten to, which can be
useful also if you run into errors halfway through an import.
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:uG******** ******@TK2MSFTN GP11.phx.gbl...
> Hello,
>
> I have the following problem:
>
> In my ASPX page is a button called "Import". The action of this button
is
to
> import a set of data in my database. I have to import big datasets
and this
> opperation is time consuming (aproximativell y 3-4 hours).
> After an hour my page display the error:
>
> "The page cannot be displayed
> The page you are looking for is currently unavailable. The Web site

might
be
> experiencing technical difficulties, or you may need to adjust your
browser
> settings.
> ............... .
> ...............
> Cannot find server or DNS Error
> Internet Explorer "
>
>
> But behind the scene my import is still working even i received this

error
> (i executed statement like "select count(*) from myImportedTable " and the
> total number of imported rows still raise even my browser is

dispaying this
> error).
>
> I modified the following timeout setting to hugh values to hope fix

this > problem but without any result
>
> 1. in my web.config file
> <authenticati on mode="Forms">
> <forms name=".HRPAUTH" loginUrl="login .aspx" protection="All "
> timeout="900"></forms>
> </authentication>
>
> <sessionState cookieless="fal se" timeout="1200" mode="InProc"
> stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data > source=127.0.0. 1;user id=sa;password= " />
>
> 2. in my machine.config file
> <processModel
> enable="true"
> timeout="Infini te"
> idleTimeout="In finite"
> shutdownTimeout ="0:00:05"
> requestLimit="I nfinite"
> requestQueueLim it="5000"
> restartQueueLim it="10"
> memoryLimit="10 0"
> webGarden="fals e"
> cpuMask="0xffff ffff"
> userName="machi ne"
> password="AutoG enerate"
> logLevel="Error s"
> clientConnected Check="0:00:05"
> comAuthenticati onLevel="Connec t"
> comImpersonatio nLevel="Imperso nate"
> responseDeadloc kInterval="10:1 0:00"
> maxWorkerThread s="25"
> maxIoThreads="2 5"
> />
>
> Your help is appreciated!
> Thanks
>
>



Nov 17 '05 #5
I don't think it needs to be as complicated as it sounds. Without knowing
more about how your import actually works here's 2 examples of how you could
do something like this.

Let's take a hypothetical function that needs to send out 60,000 emails to a
subscription list

1. Trigger the task to run and then check the level remaining
The StartImport() call could create all the emails and then place these in a
directory for SMTP to pickup. Thus there's no more work to be done on the
page. Then you can use a method like CheckEmails() to see how many are left
to send in the pickup directory.

2. Setup your data into a manageable amount and then recursively process it
In this case StartImport() creates entries in a SQL Table for each email to
send out, with a boolean flag set to false (for whether they have been
sent). Have a separate page to then send the mails out accordingly and
update the database setting the sent flag to true. However this may still
timeout. What I would do then is set the page to process a reasonable
amount without timing out (say 2500) and then refresh/redirect back to
itself to start the process off again.

If its possible I'd go with example1 but its likely you'll need to do
something more like the latter. Hope this gives you a few ideas now.

Janaka

"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:eW******** ******@TK2MSFTN GP09.phx.gbl...
The event of my import button looks like

Private Sub buttonImport_Se rverClick(ByVal sender As System.Object,
ByVal e As System.EventArg s) Handles buttonImport.Se rverClick
Dim oImportData As ImportData
Try
oImportData = New ImportData(some parameters)
oImportData.Sta rtImport()
Catch ex As Exception
' Do something
Finally
' Do something
End Try
End Sub

So from your explanation i understand that i have to do some modifications
in my code to do StartImport an asyncronous method (i dont know how i can
make this). After that i have to preserve the oImportData object across
multiple requests of this page (probably at Application level) and to use it to check the status of import process on subsequent request of the import
page.
"Janaka" <ja****@magical ia.com> wrote in message
news:ub******** ******@TK2MSFTN GP11.phx.gbl...
Well it depends on what your actual application is going to do. Can you
describe the import process that is currently in place.
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Thanx for your response Janaka. How can i implement this behavior, to start
the process of import and the same time to receive the postback of my page (the response from the server)? Can you help me?

"Janaka" <ja****@magical ia.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> I think your going about this the wrong way. Instead of trying to get
the
> page's timeout to keep up with the time-intensive operation you
should
try
> to get the page to initially start the process and then have a
method to > check the current status of your import. Each time you come to the page > afterwards you will see a progress update using this method call. That way
> you could also see how far the import has gotten to, which can be useful > also if you run into errors halfway through an import.
>
>
> "Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in
message > news:uG******** ******@TK2MSFTN GP11.phx.gbl...
> > Hello,
> >
> > I have the following problem:
> >
> > In my ASPX page is a button called "Import". The action of this

button is
> to
> > import a set of data in my database. I have to import big datasets and > this
> > opperation is time consuming (aproximativell y 3-4 hours).
> > After an hour my page display the error:
> >
> > "The page cannot be displayed
> > The page you are looking for is currently unavailable. The Web site might
> be
> > experiencing technical difficulties, or you may need to adjust your > browser
> > settings.
> > ............... .
> > ...............
> > Cannot find server or DNS Error
> > Internet Explorer "
> >
> >
> > But behind the scene my import is still working even i received this error
> > (i executed statement like "select count(*) from myImportedTable " and the
> > total number of imported rows still raise even my browser is dispaying > this
> > error).
> >
> > I modified the following timeout setting to hugh values to hope

fix this
> > problem but without any result
> >
> > 1. in my web.config file
> > <authenticati on mode="Forms">
> > <forms name=".HRPAUTH" loginUrl="login .aspx" protection="All "
> > timeout="900"></forms>
> > </authentication>
> >
> > <sessionState cookieless="fal se" timeout="1200" mode="InProc"
> > stateConnection String="tcpip=1 27.0.0.1:42424"

sqlConnectionSt ring="data
> > source=127.0.0. 1;user id=sa;password= " />
> >
> > 2. in my machine.config file
> > <processModel
> > enable="true"
> > timeout="Infini te"
> > idleTimeout="In finite"
> > shutdownTimeout ="0:00:05"
> > requestLimit="I nfinite"
> > requestQueueLim it="5000"
> > restartQueueLim it="10"
> > memoryLimit="10 0"
> > webGarden="fals e"
> > cpuMask="0xffff ffff"
> > userName="machi ne"
> > password="AutoG enerate"
> > logLevel="Error s"
> > clientConnected Check="0:00:05"
> > comAuthenticati onLevel="Connec t"
> > comImpersonatio nLevel="Imperso nate"
> > responseDeadloc kInterval="10:1 0:00"
> > maxWorkerThread s="25"
> > maxIoThreads="2 5"
> > />
> >
> > Your help is appreciated!
> > Thanks
> >
> >
>
>



Nov 17 '05 #6
Thanx for your time janaka. Even though your workaround does not fix my
problem i appreciate your responses.

"Janaka" <ja****@magical ia.com> wrote in message
news:ew******** ******@TK2MSFTN GP11.phx.gbl...
I don't think it needs to be as complicated as it sounds. Without knowing
more about how your import actually works here's 2 examples of how you could do something like this.

Let's take a hypothetical function that needs to send out 60,000 emails to a subscription list

1. Trigger the task to run and then check the level remaining
The StartImport() call could create all the emails and then place these in a directory for SMTP to pickup. Thus there's no more work to be done on the
page. Then you can use a method like CheckEmails() to see how many are left to send in the pickup directory.

2. Setup your data into a manageable amount and then recursively process it In this case StartImport() creates entries in a SQL Table for each email to send out, with a boolean flag set to false (for whether they have been
sent). Have a separate page to then send the mails out accordingly and
update the database setting the sent flag to true. However this may still
timeout. What I would do then is set the page to process a reasonable
amount without timing out (say 2500) and then refresh/redirect back to
itself to start the process off again.

If its possible I'd go with example1 but its likely you'll need to do
something more like the latter. Hope this gives you a few ideas now.

Janaka

"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:eW******** ******@TK2MSFTN GP09.phx.gbl...
The event of my import button looks like

Private Sub buttonImport_Se rverClick(ByVal sender As System.Object,
ByVal e As System.EventArg s) Handles buttonImport.Se rverClick
Dim oImportData As ImportData
Try
oImportData = New ImportData(some parameters)
oImportData.Sta rtImport()
Catch ex As Exception
' Do something
Finally
' Do something
End Try
End Sub

So from your explanation i understand that i have to do some modifications
in my code to do StartImport an asyncronous method (i dont know how i can make this). After that i have to preserve the oImportData object across
multiple requests of this page (probably at Application level) and to use
it
to check the status of import process on subsequent request of the

import page.
"Janaka" <ja****@magical ia.com> wrote in message
news:ub******** ******@TK2MSFTN GP11.phx.gbl...
Well it depends on what your actual application is going to do. Can you describe the import process that is currently in place.
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> Thanx for your response Janaka. How can i implement this behavior, to start
> the process of import and the same time to receive the postback of my
page
> (the response from the server)? Can you help me?
>
> "Janaka" <ja****@magical ia.com> wrote in message
> news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> > I think your going about this the wrong way. Instead of trying to get the
> > page's timeout to keep up with the time-intensive operation you should try
> > to get the page to initially start the process and then have a method
to
> > check the current status of your import. Each time you come to

the page
> > afterwards you will see a progress update using this method call.

That
> way
> > you could also see how far the import has gotten to, which can be

useful
> > also if you run into errors halfway through an import.
> >
> >
> > "Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message > > news:uG******** ******@TK2MSFTN GP11.phx.gbl...
> > > Hello,
> > >
> > > I have the following problem:
> > >
> > > In my ASPX page is a button called "Import". The action of this

button
> is
> > to
> > > import a set of data in my database. I have to import big
datasets and
> > this
> > > opperation is time consuming (aproximativell y 3-4 hours).
> > > After an hour my page display the error:
> > >
> > > "The page cannot be displayed
> > > The page you are looking for is currently unavailable. The Web site > might
> > be
> > > experiencing technical difficulties, or you may need to adjust your > > browser
> > > settings.
> > > ............... .
> > > ...............
> > > Cannot find server or DNS Error
> > > Internet Explorer "
> > >
> > >
> > > But behind the scene my import is still working even i received this > error
> > > (i executed statement like "select count(*) from
myImportedTable " and
> the
> > > total number of imported rows still raise even my browser is

dispaying
> > this
> > > error).
> > >
> > > I modified the following timeout setting to hugh values to hope

fix this
> > > problem but without any result
> > >
> > > 1. in my web.config file
> > > <authenticati on mode="Forms">
> > > <forms name=".HRPAUTH" loginUrl="login .aspx"

protection="All " > > > timeout="900"></forms>
> > > </authentication>
> > >
> > > <sessionState cookieless="fal se" timeout="1200" mode="InProc"
> > > stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data
> > > source=127.0.0. 1;user id=sa;password= " />
> > >
> > > 2. in my machine.config file
> > > <processModel
> > > enable="true"
> > > timeout="Infini te"
> > > idleTimeout="In finite"
> > > shutdownTimeout ="0:00:05"
> > > requestLimit="I nfinite"
> > > requestQueueLim it="5000"
> > > restartQueueLim it="10"
> > > memoryLimit="10 0"
> > > webGarden="fals e"
> > > cpuMask="0xffff ffff"
> > > userName="machi ne"
> > > password="AutoG enerate"
> > > logLevel="Error s"
> > > clientConnected Check="0:00:05"
> > > comAuthenticati onLevel="Connec t"
> > > comImpersonatio nLevel="Imperso nate"
> > > responseDeadloc kInterval="10:1 0:00"
> > > maxWorkerThread s="25"
> > > maxIoThreads="2 5"
> > > />
> > >
> > > Your help is appreciated!
> > > Thanks
> > >
> > >
> >
> >
>
>



Nov 17 '05 #7
ok, sorry I couldn't be of any more help. I've found with problems such as
this that instead of trying to get it to prevent the page timing out, you
need to rethink the functionality and design. I'd like to chat some more
but I'm off now to enjoy the weekend!
Take care,

Janaka

"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:O0******** ******@TK2MSFTN GP11.phx.gbl...
Thanx for your time janaka. Even though your workaround does not fix my
problem i appreciate your responses.

"Janaka" <ja****@magical ia.com> wrote in message
news:ew******** ******@TK2MSFTN GP11.phx.gbl...
I don't think it needs to be as complicated as it sounds. Without knowing
more about how your import actually works here's 2 examples of how you could
do something like this.

Let's take a hypothetical function that needs to send out 60,000 emails to a
subscription list

1. Trigger the task to run and then check the level remaining
The StartImport() call could create all the emails and then place these
in a
directory for SMTP to pickup. Thus there's no more work to be done on

the page. Then you can use a method like CheckEmails() to see how many are

left
to send in the pickup directory.

2. Setup your data into a manageable amount and then recursively process

it
In this case StartImport() creates entries in a SQL Table for each email

to
send out, with a boolean flag set to false (for whether they have been
sent). Have a separate page to then send the mails out accordingly and
update the database setting the sent flag to true. However this may still timeout. What I would do then is set the page to process a reasonable
amount without timing out (say 2500) and then refresh/redirect back to
itself to start the process off again.

If its possible I'd go with example1 but its likely you'll need to do
something more like the latter. Hope this gives you a few ideas now.

Janaka

"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:eW******** ******@TK2MSFTN GP09.phx.gbl...
The event of my import button looks like

Private Sub buttonImport_Se rverClick(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles buttonImport.Se rverClick
Dim oImportData As ImportData
Try
oImportData = New ImportData(some parameters)
oImportData.Sta rtImport()
Catch ex As Exception
' Do something
Finally
' Do something
End Try
End Sub

So from your explanation i understand that i have to do some modifications in my code to do StartImport an asyncronous method (i dont know how i can make this). After that i have to preserve the oImportData object across multiple requests of this page (probably at Application level) and to use
it
to check the status of import process on subsequent request of the

import page.
"Janaka" <ja****@magical ia.com> wrote in message
news:ub******** ******@TK2MSFTN GP11.phx.gbl...
> Well it depends on what your actual application is going to do. Can you > describe the import process that is currently in place.
>
>
> "Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message > news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> > Thanx for your response Janaka. How can i implement this behavior, to > start
> > the process of import and the same time to receive the postback of my page
> > (the response from the server)? Can you help me?
> >
> > "Janaka" <ja****@magical ia.com> wrote in message
> > news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> > > I think your going about this the wrong way. Instead of trying to get
> the
> > > page's timeout to keep up with the time-intensive operation you

should
> try
> > > to get the page to initially start the process and then have a

method
to
> > > check the current status of your import. Each time you come to the page
> > > afterwards you will see a progress update using this method
call. That
> > way
> > > you could also see how far the import has gotten to, which can be useful
> > > also if you run into errors halfway through an import.
> > >
> > >
> > > "Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in

message
> > > news:uG******** ******@TK2MSFTN GP11.phx.gbl...
> > > > Hello,
> > > >
> > > > I have the following problem:
> > > >
> > > > In my ASPX page is a button called "Import". The action of this button
> > is
> > > to
> > > > import a set of data in my database. I have to import big datasets and
> > > this
> > > > opperation is time consuming (aproximativell y 3-4 hours).
> > > > After an hour my page display the error:
> > > >
> > > > "The page cannot be displayed
> > > > The page you are looking for is currently unavailable. The Web

site
> > might
> > > be
> > > > experiencing technical difficulties, or you may need to adjust

your
> > > browser
> > > > settings.
> > > > ............... .
> > > > ...............
> > > > Cannot find server or DNS Error
> > > > Internet Explorer "
> > > >
> > > >
> > > > But behind the scene my import is still working even i
received this
> > error
> > > > (i executed statement like "select count(*) from myImportedTable " and
> > the
> > > > total number of imported rows still raise even my browser is
dispaying
> > > this
> > > > error).
> > > >
> > > > I modified the following timeout setting to hugh values to
hope fix
> this
> > > > problem but without any result
> > > >
> > > > 1. in my web.config file
> > > > <authenticati on mode="Forms">
> > > > <forms name=".HRPAUTH" loginUrl="login .aspx"

protection="All " > > > > timeout="900"></forms>
> > > > </authentication>
> > > >
> > > > <sessionState cookieless="fal se" timeout="1200" mode="InProc"
> > > > stateConnection String="tcpip=1 27.0.0.1:42424"
> sqlConnectionSt ring="data
> > > > source=127.0.0. 1;user id=sa;password= " />
> > > >
> > > > 2. in my machine.config file
> > > > <processModel
> > > > enable="true"
> > > > timeout="Infini te"
> > > > idleTimeout="In finite"
> > > > shutdownTimeout ="0:00:05"
> > > > requestLimit="I nfinite"
> > > > requestQueueLim it="5000"
> > > > restartQueueLim it="10"
> > > > memoryLimit="10 0"
> > > > webGarden="fals e"
> > > > cpuMask="0xffff ffff"
> > > > userName="machi ne"
> > > > password="AutoG enerate"
> > > > logLevel="Error s"
> > > > clientConnected Check="0:00:05"
> > > > comAuthenticati onLevel="Connec t"
> > > > comImpersonatio nLevel="Imperso nate"
> > > > responseDeadloc kInterval="10:1 0:00"
> > > > maxWorkerThread s="25"
> > > > maxIoThreads="2 5"
> > > > />
> > > >
> > > > Your help is appreciated!
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 17 '05 #8
Why do you need this application to be an import. Web applications are not
really a great platform to create "Batch Type" jobs that take a long time to
run. Why don't you write this as a fat clinet applications and then
schedule this to run using some sort so scheduling software. We usre Aracan
and have been very happy with the product and it is very reasonalby priced.

If this must be a web application then try using the web.config entry below.

<!-- HTTPRuntime
This section sets the httpRuntime settings of the application.
-->
<httpRuntime executionTimeou t="150" maxRequestLengt h="4096"
useFullyQualifi edRedirectUrl=" false" minFreeThreads= "8"
minLocalRequest FreeThreads="4" appRequestQueue Limit="100"/>

Thanks,

S. Shawn Mehaffie
PC************@ hotmail.com
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:uG******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I have the following problem:

In my ASPX page is a button called "Import". The action of this button is to import a set of data in my database. I have to import big datasets and this opperation is time consuming (aproximativell y 3-4 hours).
After an hour my page display the error:

"The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.
............... .
...............
Cannot find server or DNS Error
Internet Explorer "
But behind the scene my import is still working even i received this error
(i executed statement like "select count(*) from myImportedTable " and the
total number of imported rows still raise even my browser is dispaying this error).

I modified the following timeout setting to hugh values to hope fix this
problem but without any result

1. in my web.config file
<authenticati on mode="Forms">
<forms name=".HRPAUTH" loginUrl="login .aspx" protection="All "
timeout="900"></forms>
</authentication>

<sessionState cookieless="fal se" timeout="1200" mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= " />

2. in my machine.config file
<processModel
enable="true"
timeout="Infini te"
idleTimeout="In finite"
shutdownTimeout ="0:00:05"
requestLimit="I nfinite"
requestQueueLim it="5000"
restartQueueLim it="10"
memoryLimit="10 0"
webGarden="fals e"
cpuMask="0xffff ffff"
userName="machi ne"
password="AutoG enerate"
logLevel="Error s"
clientConnected Check="0:00:05"
comAuthenticati onLevel="Connec t"
comImpersonatio nLevel="Imperso nate"
responseDeadloc kInterval="10:1 0:00"
maxWorkerThread s="25"
maxIoThreads="2 5"
/>

Your help is appreciated!
Thanks

Nov 18 '05 #9
Why do you need this application to be an import. Web applications are not
really a great platform to create "Batch Type" jobs that take a long time to
run. Why don't you write this as a fat clinet applications and then
schedule this to run using some sort so scheduling software. We usre Aracan
and have been very happy with the product and it is very reasonalby priced.

If this must be a web application then try using the web.config entry below.

<!-- HTTPRuntime
This section sets the httpRuntime settings of the application.
-->
<httpRuntime executionTimeou t="150" maxRequestLengt h="4096"
useFullyQualifi edRedirectUrl=" false" minFreeThreads= "8"
minLocalRequest FreeThreads="4" appRequestQueue Limit="100"/>

Thanks,

S. Shawn Mehaffie
PC************@ hotmail.com
"Adrian Dragomirescu" <ad***********@ romsystems.com> wrote in message
news:uG******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I have the following problem:

In my ASPX page is a button called "Import". The action of this button is to import a set of data in my database. I have to import big datasets and this opperation is time consuming (aproximativell y 3-4 hours).
After an hour my page display the error:

"The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.
............... .
...............
Cannot find server or DNS Error
Internet Explorer "
But behind the scene my import is still working even i received this error
(i executed statement like "select count(*) from myImportedTable " and the
total number of imported rows still raise even my browser is dispaying this error).

I modified the following timeout setting to hugh values to hope fix this
problem but without any result

1. in my web.config file
<authenticati on mode="Forms">
<forms name=".HRPAUTH" loginUrl="login .aspx" protection="All "
timeout="900"></forms>
</authentication>

<sessionState cookieless="fal se" timeout="1200" mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= " />

2. in my machine.config file
<processModel
enable="true"
timeout="Infini te"
idleTimeout="In finite"
shutdownTimeout ="0:00:05"
requestLimit="I nfinite"
requestQueueLim it="5000"
restartQueueLim it="10"
memoryLimit="10 0"
webGarden="fals e"
cpuMask="0xffff ffff"
userName="machi ne"
password="AutoG enerate"
logLevel="Error s"
clientConnected Check="0:00:05"
comAuthenticati onLevel="Connec t"
comImpersonatio nLevel="Imperso nate"
responseDeadloc kInterval="10:1 0:00"
maxWorkerThread s="25"
maxIoThreads="2 5"
/>

Your help is appreciated!
Thanks

Nov 18 '05 #10

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

Similar topics

0
1385
by: Mike G | last post by:
Hi - I support a web application that contains many ASP's. Periodically, the DLLHOST.EXE running this app (we have it in High protection) will start taking alot of time (consistently between 30 and 60% in Task Manager), and the number of threads increases, and the memory in use goes up. I have started looking at the performance monitor, and note under Active Server Pages there is a counter "Request Execution Time". I notice that...
5
1655
by: z. f. | last post by:
Hi, i have a vb.net windows application that makes HTTP requests with the framework's HttpWebReqeuest object. i have about 10 different requests that takes between 30 to 500 for the Request.GetResponse function to execute. this is acceptable. problem is that for 1 of the 10 urls i request, when i call the responseBody = reader.ReadToEnd() & "" it takes about 11.50 seconds (!) to execute and return the responseBody.
4
1725
by: Manuel | last post by:
I have a long function that needs to be done 1000 times. I'm multithreading it, but I don't want to load them up all at once, instead load them 10 at a time. So far the only way I can get it to work is by creating a dummy form with a timer. On the timer function I test if the number of threads are less than 10 then run the remaining ones. This is working fine, but I would like to know how to do it without the form. This is the code...
2
2899
by: Kevin Frey | last post by:
Hello, I've been reading that ASP.NET serialises (ie. processes one at a time) HTTP requests if two simultaneous requests need to access the same session state. It also makes note that ASP.NET tries to reacquire a lock on the session state every 1/2 second until the timeout is reached, and then it will forcibly release the previous users lock and take the lock for itself. What is this timeout figure?
3
8239
by: rdudejr | last post by:
Hi all, Ive got a database approx 350 GB in which Im getting very high Time waited for prefetch. This is directly out of the snapshot for the db (these are for the entire database I assume as I pulled it out of get snapshot for all on {dbname}) Total buffer pool read time (milliseconds) = 45660639 Total buffer pool write time (milliseconds)= 42128058 Total elapsed asynchronous read time = 33856320
3
1713
by: Tim_Mac | last post by:
hi, i'm generating PDF files from crystal reports in my .Net 1.1 web site, and saving them to disk for the user to download in their own time. the format i'm currently using is: FileName_<DateTime.Now.Ticks>.PDF there is a relatively low level of concurrent users on this site, but i am a little concerned that two requests could happen within the same tick, resulting in a filename clash and overwrite. is this possible? the docs say...
1
1499
by: Andy | last post by:
Hi all, I'm familiar with web service compression and how to implement it in a Winforms app. What I'm trying to figure out how to do at this point is how to consume the service from an ASP.NET page. I've surfed around quite a bit looking for an answer to this, but most of the stuff I'm seeing is either talking about consuming from a Winforms app or enabling web compression for ASPX pages to the user's browser. Here's our setup: We...
1
2291
by: Morgan Cheng | last post by:
I have one webservice that involves time-costing computation. For each request, it consumes about 2 seconds computation. Since ASP.NET has 25 threads per CPU to handle requests, this delay turns to be bottleneck if webservice is synchronous. Say, the webserivce is called ABC, then one thread is arranged for one call to ABC, and the thread is not released until the result is returned. I once configured to implement it as Asynchronous...
4
1535
by: Deane | last post by:
Is there a lease time on Web service requests? We have a Web service that stops responding after a couple days. After a certain point in time, all requests to it get "The operation has timed out." It just happens suddenly, every 48 hours or so, and all requests begin fail. What's odd is that it appears to be client-specific. After this error appears, you can still pull up the WSDL in a browser and it responds fine (the browser,...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10038
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,...
0
9912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7460
isladogs
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...
0
6715
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();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
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...

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.