|
Did you try setting the Server.ScriptTimeout property
or scriptManager.AsyncPostBackTimeout if you are using a updatepanel.
|
|
|
|
|
Thank you for your reply.
It is important for me not to change any timeout values. It's a security requirement.
Any idea if a thread is running on the server, will it keep the session alive or should we do a postback to keep it alive?
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Response will not be held until the thread method is finished.
Even if the server timeout is reached, thread will continue its execution,it wont be clubbed with the page's life cycle execution.
Using a thread might solve your problem,but you should think of many other scenarios like when to dispose your thread,when and where to check the thread status for disposal.
Also keep in mind how many users simultaneously will try to do an upload.
You might end up with serious memory leakage problems.
These things might me costlier than the security requirement you try to maintain.
|
|
|
|
|
Thanks for your analysis. So basically I can try using this thread solution but I should to be careful of what will happen around it. I knew it would have other implications. I need to do a few tests now
Thank you.
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
A trick I use to keep the session alive on a particular page is as follows:
Add the following to the body of your page (or add it via RegisterClientScriptBlock in Page_Load in code behind):
<script type='text/javascript'>
function Reconnect(){
var img = new Image(1,1);
img.src = '../common/reconnect.aspx';
}
window.setInterval('Reconnect()',1170000);
// 1170000 = (20 * 60000) - 30000 = 30s short of 20min, the default timeout
</script>
having saved the follwing single line as reconnect.aspx
<%@ OutputCache Location="None" VaryByParam="None" %>
Works for me... the function Reconnect() gets called every 19.5 minutes, effectively pinging the server by calling nrecconect.aspx as the src of a 1x1px image...
Hope this can help you..
|
|
|
|
|
Thanks. I will try that, even though I am not sure it would work.
You see, the problem I have is that Javascript is already running to upload the file and I have an Ajax timer set to postback every 6 sec (just for testing now). As soon as the upload starts, the timer stops working. So I suspect that only one Javascript code (or whatever) is executed and we cannot have multiple "threads" in Javascript executing at the same time.
But I will try out your solution, maybe it would work since the javascript code (in the page) is executed once. I hope it would work
Thank you
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
hi friends,
i am ram working on asp.net,c#.now i am going to research on asp.net MVC.
My requirement is how to generate dynamic views dynamically at run time in asp.net mvc.
cheers,
ram.
|
|
|
|
|
Hello!
I´ve got a textbox where the user can write his/her email. I´ve got two validators pointing at this textbox, one asp:RequiredFieldValidator to make sure textbox is not empty and one asp:RegularExpressionValidator to make sure the email adress is correct (tried to use asp:RegularExpressionValidator but couldnt get it to work). My problem is to make the errors from these two validators showing in the same place. Right now it goes something like this:
[textbox for email ]
error1! error2!
thanks!
|
|
|
|
|
You can try setting the Display property to Dynamic .
Example:
<asp:RequiredFieldValidator ID="requiredEmailAddress" runat="server" ControlToValidate="txtEmailAddress" Display="Dynamic" CssClass="SomeClass"></asp:RequiredFieldValidator>
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Just Set the Display="Dynamic" for both the validation control By default it is static. You have to change to to dynamic . You can change i from code behind or from Validation control property itself.
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
duh thanks alot guys!
|
|
|
|
|
hai,
i am use asp.net.i host my website project in online.but it work slow.
how to reduce loading time in website ? what can i do ? if you know thw answer replay to me............
thank you..
|
|
|
|
|
|
hello sir,
plz tell me how to integrate a payement gateway from payapl in my application.
actually i make e-commerce application in this user can pucrchase and sell
so sir how to integrate payment gateway from paypal.
plz specify in one by one steps.
im very thankful to u
|
|
|
|
|
|
Hi all,
I am getting this nasty error when i display a huge amount of data on my web page.Some times i get this error on hitting the search button and some times when i export the grid to excel.
The only solution i got is to reset the IIS using
iisreset
Is there any other programmatic solution for this problem.Also i cant do paging as the client wishes to see all the data at once.
Any help would be appreciated.
When you fail to plan, you are planning to fail.
|
|
|
|
|
www.Developerof.NET wrote: when i display a huge amount of data on my web page.
How much data?
This is my suggestion, please don't try to display huge amount of data on web pages. I have faced several question in this forums itself that they want More than 10,000 Records to show in pages. But why ? Its seriously causes a performance issue. Please use Filter and search to minimize the records.
www.Developerof.NET wrote: The only solution i got is to reset the IIS using
iisreset
This is not a permanent solution .
www.Developerof.NET wrote: Is there any other programmatic solution for this problem.
please check those point that I have already discuss.
www.Developerof.NET wrote: Also i cant do paging as the client wishes to see all the data at once.
Some times it also depends of how much memory you have on server, Number of concurrent users, Session Data Size, Cache Data Size etc.
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
I am also getting this error. when restate IIS, then working but after some time getting this error.
and also I have no more data
|
|
|
|
|
hello sir,
I make one application of e-commerece i want to implement payment gateway im also use ur given code to chk credit card no. bt is not work i don't know how to run.and also i don't hvae any idea abt this plz also tell me abt database of payment which fields are taking plz specify.
im use 2.0 version in asp.net and c#........
plz specify whole steps...
i wantt urgently this code tell....
and also sepecify how toload assmbly and give refrence in visual studio for credit card validator.
|
|
|
|
|
Already Provided !!!
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
hello
i am having a dll (Hero.dll). i want to fatch his java script function on the click of link in my asp.net application.
how it will be posible.
Thanks
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
|
|
|
|
|
Yesterday there was a similar thread in CP. Please have a Look[^]
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Thanks For Your Reply,
i am having dll. in this dll some file of java script and .cs. in the java script file i am having a function showdailog().
now i m adding this dll in my project. and now how i can fatch this function on my button click.
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
|
|
|
|
|
Did you gone through the link that I have Provided to you ? Check the last post of that thread. I have given a link to how to do it .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Hi all,
I am doing validations for text box and i want to check that it allows to enter the alphabets,spaces.so for alphabets we write the exp as [a-zA-Z] but for space(space bar) how should i do it ?
Thanks in advance...
|
|
|
|