473,421 Members | 1,703 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,421 software developers and data experts.

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 (aproximativelly 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
<authentication mode="Forms">
<forms name=".HRPAUTH" loginUrl="login.aspx" protection="All"
timeout="900"></forms>
</authentication>

<sessionState cookieless="false" timeout="1200" mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password=" />

2. in my machine.config file
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="100"
webGarden="false"
cpuMask="0xffffffff"
userName="machine"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="10:10:00"
maxWorkerThreads="25"
maxIoThreads="25"
/>

Your help is appreciated!
Thanks
Nov 17 '05 #1
9 2129
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**************@TK2MSFTNGP11.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 (aproximativelly 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
<authentication mode="Forms">
<forms name=".HRPAUTH" loginUrl="login.aspx" protection="All"
timeout="900"></forms>
</authentication>

<sessionState cookieless="false" timeout="1200" mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password=" />

2. in my machine.config file
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="100"
webGarden="false"
cpuMask="0xffffffff"
userName="machine"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="10:10:00"
maxWorkerThreads="25"
maxIoThreads="25"
/>

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****@magicalia.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP11.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 (aproximativelly 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
<authentication mode="Forms">
<forms name=".HRPAUTH" loginUrl="login.aspx" protection="All"
timeout="900"></forms>
</authentication>

<sessionState cookieless="false" timeout="1200" mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password=" />

2. in my machine.config file
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="100"
webGarden="false"
cpuMask="0xffffffff"
userName="machine"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="10:10:00"
maxWorkerThreads="25"
maxIoThreads="25"
/>

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****************@TK2MSFTNGP09.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****@magicalia.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP11.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 (aproximativelly 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
<authentication mode="Forms">
<forms name=".HRPAUTH" loginUrl="login.aspx" protection="All"
timeout="900"></forms>
</authentication>

<sessionState cookieless="false" timeout="1200" mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" />

2. in my machine.config file
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="100"
webGarden="false"
cpuMask="0xffffffff"
userName="machine"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="10:10:00"
maxWorkerThreads="25"
maxIoThreads="25"
/>

Your help is appreciated!
Thanks



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

Private Sub buttonImport_ServerClick(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles buttonImport.ServerClick
Dim oImportData As ImportData
Try
oImportData = New ImportData(some parameters)
oImportData.StartImport()
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****@magicalia.com> wrote in message
news:ub**************@TK2MSFTNGP11.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****************@TK2MSFTNGP09.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****@magicalia.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP11.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 (aproximativelly 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
> <authentication mode="Forms">
> <forms name=".HRPAUTH" loginUrl="login.aspx" protection="All"
> timeout="900"></forms>
> </authentication>
>
> <sessionState cookieless="false" timeout="1200" mode="InProc"
> stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data > source=127.0.0.1;user id=sa;password=" />
>
> 2. in my machine.config file
> <processModel
> enable="true"
> timeout="Infinite"
> idleTimeout="Infinite"
> shutdownTimeout="0:00:05"
> requestLimit="Infinite"
> requestQueueLimit="5000"
> restartQueueLimit="10"
> memoryLimit="100"
> webGarden="false"
> cpuMask="0xffffffff"
> userName="machine"
> password="AutoGenerate"
> logLevel="Errors"
> clientConnectedCheck="0:00:05"
> comAuthenticationLevel="Connect"
> comImpersonationLevel="Impersonate"
> responseDeadlockInterval="10:10:00"
> maxWorkerThreads="25"
> maxIoThreads="25"
> />
>
> 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**************@TK2MSFTNGP09.phx.gbl...
The event of my import button looks like

Private Sub buttonImport_ServerClick(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles buttonImport.ServerClick
Dim oImportData As ImportData
Try
oImportData = New ImportData(some parameters)
oImportData.StartImport()
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****@magicalia.com> wrote in message
news:ub**************@TK2MSFTNGP11.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****************@TK2MSFTNGP09.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****@magicalia.com> wrote in message
news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP11.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 (aproximativelly 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
> > <authentication mode="Forms">
> > <forms name=".HRPAUTH" loginUrl="login.aspx" protection="All"
> > timeout="900"></forms>
> > </authentication>
> >
> > <sessionState cookieless="false" timeout="1200" mode="InProc"
> > stateConnectionString="tcpip=127.0.0.1:42424"

sqlConnectionString="data
> > source=127.0.0.1;user id=sa;password=" />
> >
> > 2. in my machine.config file
> > <processModel
> > enable="true"
> > timeout="Infinite"
> > idleTimeout="Infinite"
> > shutdownTimeout="0:00:05"
> > requestLimit="Infinite"
> > requestQueueLimit="5000"
> > restartQueueLimit="10"
> > memoryLimit="100"
> > webGarden="false"
> > cpuMask="0xffffffff"
> > userName="machine"
> > password="AutoGenerate"
> > logLevel="Errors"
> > clientConnectedCheck="0:00:05"
> > comAuthenticationLevel="Connect"
> > comImpersonationLevel="Impersonate"
> > responseDeadlockInterval="10:10:00"
> > maxWorkerThreads="25"
> > maxIoThreads="25"
> > />
> >
> > 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****@magicalia.com> wrote in message
news:ew**************@TK2MSFTNGP11.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**************@TK2MSFTNGP09.phx.gbl...
The event of my import button looks like

Private Sub buttonImport_ServerClick(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles buttonImport.ServerClick
Dim oImportData As ImportData
Try
oImportData = New ImportData(some parameters)
oImportData.StartImport()
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****@magicalia.com> wrote in message
news:ub**************@TK2MSFTNGP11.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****************@TK2MSFTNGP09.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****@magicalia.com> wrote in message
> news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP11.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 (aproximativelly 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
> > > <authentication mode="Forms">
> > > <forms name=".HRPAUTH" loginUrl="login.aspx"

protection="All" > > > timeout="900"></forms>
> > > </authentication>
> > >
> > > <sessionState cookieless="false" timeout="1200" mode="InProc"
> > > stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
> > > source=127.0.0.1;user id=sa;password=" />
> > >
> > > 2. in my machine.config file
> > > <processModel
> > > enable="true"
> > > timeout="Infinite"
> > > idleTimeout="Infinite"
> > > shutdownTimeout="0:00:05"
> > > requestLimit="Infinite"
> > > requestQueueLimit="5000"
> > > restartQueueLimit="10"
> > > memoryLimit="100"
> > > webGarden="false"
> > > cpuMask="0xffffffff"
> > > userName="machine"
> > > password="AutoGenerate"
> > > logLevel="Errors"
> > > clientConnectedCheck="0:00:05"
> > > comAuthenticationLevel="Connect"
> > > comImpersonationLevel="Impersonate"
> > > responseDeadlockInterval="10:10:00"
> > > maxWorkerThreads="25"
> > > maxIoThreads="25"
> > > />
> > >
> > > 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**************@TK2MSFTNGP11.phx.gbl...
Thanx for your time janaka. Even though your workaround does not fix my
problem i appreciate your responses.

"Janaka" <ja****@magicalia.com> wrote in message
news:ew**************@TK2MSFTNGP11.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**************@TK2MSFTNGP09.phx.gbl...
The event of my import button looks like

Private Sub buttonImport_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonImport.ServerClick
Dim oImportData As ImportData
Try
oImportData = New ImportData(some parameters)
oImportData.StartImport()
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****@magicalia.com> wrote in message
news:ub**************@TK2MSFTNGP11.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****************@TK2MSFTNGP09.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****@magicalia.com> wrote in message
> > news:%2****************@TK2MSFTNGP09.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**************@TK2MSFTNGP11.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 (aproximativelly 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
> > > > <authentication mode="Forms">
> > > > <forms name=".HRPAUTH" loginUrl="login.aspx"

protection="All" > > > > timeout="900"></forms>
> > > > </authentication>
> > > >
> > > > <sessionState cookieless="false" timeout="1200" mode="InProc"
> > > > stateConnectionString="tcpip=127.0.0.1:42424"
> sqlConnectionString="data
> > > > source=127.0.0.1;user id=sa;password=" />
> > > >
> > > > 2. in my machine.config file
> > > > <processModel
> > > > enable="true"
> > > > timeout="Infinite"
> > > > idleTimeout="Infinite"
> > > > shutdownTimeout="0:00:05"
> > > > requestLimit="Infinite"
> > > > requestQueueLimit="5000"
> > > > restartQueueLimit="10"
> > > > memoryLimit="100"
> > > > webGarden="false"
> > > > cpuMask="0xffffffff"
> > > > userName="machine"
> > > > password="AutoGenerate"
> > > > logLevel="Errors"
> > > > clientConnectedCheck="0:00:05"
> > > > comAuthenticationLevel="Connect"
> > > > comImpersonationLevel="Impersonate"
> > > > responseDeadlockInterval="10:10:00"
> > > > maxWorkerThreads="25"
> > > > maxIoThreads="25"
> > > > />
> > > >
> > > > 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 executionTimeout="150" maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>

Thanks,

S. Shawn Mehaffie
PC************@hotmail.com
"Adrian Dragomirescu" <ad***********@romsystems.com> wrote in message
news:uG**************@TK2MSFTNGP11.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 (aproximativelly 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
<authentication mode="Forms">
<forms name=".HRPAUTH" loginUrl="login.aspx" protection="All"
timeout="900"></forms>
</authentication>

<sessionState cookieless="false" timeout="1200" mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password=" />

2. in my machine.config file
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="100"
webGarden="false"
cpuMask="0xffffffff"
userName="machine"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="10:10:00"
maxWorkerThreads="25"
maxIoThreads="25"
/>

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 executionTimeout="150" maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>

Thanks,

S. Shawn Mehaffie
PC************@hotmail.com
"Adrian Dragomirescu" <ad***********@romsystems.com> wrote in message
news:uG**************@TK2MSFTNGP11.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 (aproximativelly 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
<authentication mode="Forms">
<forms name=".HRPAUTH" loginUrl="login.aspx" protection="All"
timeout="900"></forms>
</authentication>

<sessionState cookieless="false" timeout="1200" mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password=" />

2. in my machine.config file
<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="100"
webGarden="false"
cpuMask="0xffffffff"
userName="machine"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="10:10:00"
maxWorkerThreads="25"
maxIoThreads="25"
/>

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
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...
5
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...
4
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...
2
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...
3
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...
3
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: ...
1
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...
1
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...
4
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
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...
1
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...
0
agi2029
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,...
0
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...

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.