Re: two threads

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Well, in order to do this, you will have to send some piece of information back to the user that will allow the user to identify which stored proc that she wants to check up on. When your thread is done, you would place information in the Session collection (or some other collection which is accessible to the user) keyed on the value indicated above to indicate that the process is complete.

However, even if you run this on a separate thread, it's not going to work. The reason for this is that you are getting a SqlException, which indicates that the command is timing out. Just running this on another thread will cause the exception to be thrown on that other thread.

Rather, you should set the CommandTimeout property on the SqlCommand you are executing to a value that will be reasonable for the operation you are performing.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"polilop" <filip.matosicSKINIovo@@st.htnet.hr> wrote in message news:0AEBBFCF-35F3-4242-B512-70A32EA77E86@xxxxxxxxxxxxxxxx
I have a stored procedure in my web application that goes on for long time,
which couses IE to :
[SqlException (0x80131904): Timeout expired. The timeout period elapsed
prior to completion of the operation or the server is not responding.]

So i thought to enable the user to run the stored procedure in a background
thread (which will fill a temporary table with data), return the http
response,
which tells the user the program started. Then the user can check if the
program has finished by checking the thread.

What i need to know is how can i run a seperate thread, return http
response (postback) to the user, and allso how to check if the thread is
still running from a second/another http reqest ?


.



Relevant Pages

  • Re: two threads
    ... Great, this solved the problem but Still the procedure lasts for long time, ... you should set the CommandTimeout property on the SqlCommand you are executing to a value that will be reasonable for the operation you are performing. ... What i need to know is how can i run a seperate thread, return http ... response to the user, and allso how to check if the thread is ...
    (microsoft.public.dotnet.languages.csharp)
  • Technical Note by Amit Klein: Detecting and Preventing HTTP Response Splitting and HTTP Request Smug
    ... Detecting and Preventing HTTP Response Splitting ... This technique makes use of implicit information ... server, ...
    (Bugtraq)
  • RE: "Divide and Conquer" - cross site response header tampering, cookie manipulation, and
    ... The attack I described, HTTP ... Response Splitting, ... cookie from their own web server while redirecting to another site. ... so the victim cannot maintain their session) or could be used ...
    (Bugtraq)
  • Re: XHR Problem on all Browsers -- except IE
    ... Does this mean that the response text is faulty? ... request objects is supposed to report the HTTP status of a response, and HTTP does not define a status of zero. ... Seeing a status of zero may suggest that the code that sees the 'response' is seeing it outside of an HTTP context. ... However, I am not certain about this as I am still using XML HTTP request handling modulethat I wrote back in 2003, and they sequence things such that they avoid the original issue. ...
    (comp.lang.javascript)
  • [Full-disclosure] Googles Blogger.com classic HTTP response splitting vulnerability
    ... Blogger's personal page redirection mechanism contains a classic HTTP ... response splitting vulnerability in the "Location" HTTP header. ... Vendor notified. ...
    (Full-Disclosure)