|
Hi,
I have developed a web application and have set session timeout to 20 min.
Now here is the problem, I open a web page and does not take any action on it for about 1 hr.After 1 hr I take a action on that page and application handles it.I face this problem for few pages in application. I am not able to get why this problem occurs.
Thanks
|
|
|
|
|
You also set the property in global.asax.cs file
void Session_Start(object sender, EventArgs e)
{
Session.Timeout = 20;
}
bye..
|
|
|
|
|
It is likely that a new session is being created when you hit the page after the 20min time out and its being posted back.
Place this at the top of your Load.Page or place other code in your Global.aspx Session Start. Note: Session End will not effect client page view.
if (Session.IsNewSession)
{
// New Session
// Take your pick
Server.Transfer("Default.aspx");
Response.Redirect("Default.aspx");
}
Look where you want to go not where you don't want to crash.
Bikers Bible
-- modified at 6:44 Tuesday 25th April, 2006
|
|
|
|
|
Hi All,
I need a clarification?
How to open a windows application from the asp.net page.
Pls give a suggesstion with sample code.
Thanks
PAUL
PAUL
-- modified at 5:14 Tuesday 25th April, 2006
|
|
|
|
|
You cannot open a windows application on the users machine from a webpage. You can give the user the optin to download your program, and it is then in their control as to whether to execute it.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
I am creating html file at run time using the StreamWriter object. After creating 2000 files throws an error Arthimetic operations results in overflow?
Can any one help me ?
Thanks in Advance
|
|
|
|
|
msharmamahesh wrote: After creating 2000 files throws an error Arthimetic operations results in overflow?
What's the code? What are the inputs to the "Arithmetic operations"? What are the expected results of the arithmentic operations?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
What I am doing is just fire a query from sql server, If the number of records are 30000 then there is no problem but after 32000 records is show an error.I am releasing memory after every 50 page like that
If gstrHTMLFileCounter Mod 50 = 0 Then
GC.Collect()
GC.GetTotalMemory(True)
GC.WaitForPendingFinalizers()
End If
I am not using integer all the fetch records are string ?
Thanks
mahesh
-- modified at 6:14 Tuesday 25th April, 2006
|
|
|
|
|
msharmamahesh wrote: If the number of records are 30000 then there is no problem but after 32000 records is show an error
I would guess that it is actually after 32767
You have an Int16 somewhere in your .NET code or a SMALLINT in your database. However, since you show neither I cannot see what it might be.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
But I am not using Int16 in dot net code and SMALLINT in database, still getting error.
|
|
|
|
|
Well, something has a signed 16bit limit on it and that is the most likely cause of your overflow error.
You need to post appropriate code - that includes the declaration of variables so the types are known.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Thanks Dear your are very right My problem is solved.
Thanks a lot
Mahesh
|
|
|
|
|
Hi colin, I am calling our own API for creating a PDF files at run time. Also I am releasing memory after every 10 pages created at run time like that
If gstrPDFFileCounter Mod 10 = 0 Then
GC.Collect()
GC.GetTotalMemory(True)
GC.WaitForPendingFinalizers()
End If
But after 1046 files created successfully It stops creating pdf files and does not show any error. I think there is some memory leak. How do i fix it.
Thanks
Mahesh
-- modified at 0:56 Wednesday 26th April, 2006
|
|
|
|
|
Do you have an int somewhere that you are indexing and maybe not setting back to zero between writes?
|
|
|
|
|
Hi paddy,
Dear my Arthimetic opeartions overflow problem is solved.
Now my problem is
I am calling our own API for creating a PDF files at run time. Also I am releasing memory after every 10 pages created at run time like that
If gstrPDFFileCounter Mod 10 = 0 Then
GC.Collect()
GC.GetTotalMemory(True)
GC.WaitForPendingFinalizers()
End If
But after 1046 files created successfully It stops creating pdf files and does not show any error. I think there is some memory leak. How do i fix it.
|
|
|
|
|
hi all
can anybody tell me the advantage of using multiple config files.
coolsweety
|
|
|
|
|
You can define custom settings for different folders? What exactly would you like to know?
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
How to change the colour of my datagrid scroll bars in win forms and c#
Thanx,
meer
Software Developer
Pune.
|
|
|
|
|
This is the ASP.NET forum. You would be better of asking the question in the C# forum instead, as it's not web related.
---
b { font-weight: normal; }
|
|
|
|
|
i wanna know how to change the combobox scrollbar color in windows based application.
can anyone helop me out n tell me by which property setting i ll get different color of scrollbars..
eagerly waiting for reply
Thanx,
meer
Software Developer
Pune.
|
|
|
|
|
this is the asp.Net forum, maybe you can ask your question in the C# or the VB.Net forum?
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
I am developing an application in which I have to ask the user to upload some file (of .jpg,.gif or .bmp formats). I want to store that file in a directory in my root directory of the application. I need to create a special folder for each user in that folder and paste those files uploaded from the user. Plz send me some sample code if u have any or just send me some suggestion of the classes and functions to be used.
Thanks,
Sandy
|
|
|
|
|
|
But FileUpload class is present only in .NET 2.0 whereas I am using 1.1 version for my whole project. Plz tell me the method to do it in .NET 1.1 framework
Thanks,
Sandy
|
|
|
|
|
Try the below code,It is working in .Net 1.1
//uploading files control
System.Web.UI.HtmlControls.HtmlInputFile ctlImageInput;
//Declarations
string strFileName;
string strFilePath;
string strFolder;
//u can use the unique user name for all the folders
strFolder = AppDomain.CurrentDomain.BaseDirectory + "Images/username";
// Creating Directory
if ((!(Directory.Exists(strFolder))))
{
Directory.CreateDirectory(strFolder);
}
//Saving source file to destination
if( ctlImageInput.Value !="")
{
strFileName = ctlImageInput.PostedFile.FileName;
strFileName = Path.GetFileName(strFileName);
strFilePath = strFolder + "/"+ strFileName;
ctlImageInput.PostedFile.SaveAs(strFilePath);
}
|
|
|
|