Web Forms :: Keep Session Variables Active For Longer Period?

Jun 15, 2013

When user log's in with it's emaild and password, I have stored it's email id in session variable as: Session("user"). After logged in, If i leave the page kept opened OR ideal for sometime and after thatt if I select any option from user profile, the session variable get expired and send's me back to login page.  I want that if I would create 2 to 3 session variable's it should remain activated for longer period. So that even if page kept ideal for longer period and then if selects any option, the session variable's should not be expired soon.

View 1 Replies


Similar Messages:

Loading Of Website "longer Inactive Period"

Sep 29, 2010

I am facing a strange issue with my website. If there is a longer inactive period (say a few hours) on my website, and when it is first opened after a longer period of inactivity, it takes almost 50 to 60 seconds to load 1st page. However, thenafter if you reload the indexpage or open any other pages, they are opening in a few seconds. This is trace information about opening my default page . (After 8 ours of innactivity)

aspx.page Begin PreInit
aspx.page End PreInit 6,5818664 6,581866
aspx.page Begin Init 6,5971016 0,015235
aspx.page End Init 6,9403593 0,343258
aspx.page Begin InitComplete 6,9404871 0,000128
aspx.page End InitComplete 6,9406603 0,000173
aspx.page Begin PreLoad 6,940708 0,000048
aspx.page End PreLoad 6,9622082 0,021500
aspx.page Begin Load 6,9623434 0,000135
aspx.page End Load 44,5811131 37,618770
aspx.page Begin LoadComplete 44,6315493 0,050436
aspx.page End LoadComplete 44,6571296 0,025580
aspx.page Begin PreRender 44,65722 0,000090
aspx.page End PreRender 45,0207436 0,363524
aspx.page Begin PreRenderComplete 45,0208894 0,000146
aspx.page End PreRenderComplete 50,0494938 5,028604
aspx.page Begin SaveState 50,3189146 0,269421
aspx.page End SaveState 51,6102916 1,291377
aspx.page Begin SaveStateComplete 51,6104301 0,000139
aspx.page End SaveStateComplete 51,6104991 0,000069
aspx.page Begin Render 51,6105747 0,000076
aspx.page End Render 51,7896603 0,179086

View 5 Replies

Web Forms :: How To Increase Session Logout Period In Website

Jun 17, 2013

My asp site make user log out automatically in 10 minutes  how can i increase the time.

View 1 Replies

Collect 2 Variables From One Hyperlink, And Use Those Variables In The Page_load To Set As Session?

Aug 8, 2010

i am trying to collect 2 variables from one hyperlink, and use those variables in the page_load to set as session. but i don't know how to collect those 2 variables

such :

<a href="javascript:;" onclick="wsChangeColor('mainData', '#FF0000','#FFE4E1');return false;" title="Change color" id="red">1</a>

i would like to collect '#FF0000','#FFE4E1' or direct set '#FF0000','#FFE4E1' to string then send to pageload, how can i do this by only clicking on it ?

View 1 Replies

Session Objects Are Not Removed After Timeout Period?

Feb 8, 2011

Why Session objects are not removed after Timeout period?

I am using Asp.Net 4.0 and Session state is configured as shown below.

<sessionState mode="SQLServer" cookieless="false" timeout="5"
allowCustomSqlDatabase="true"
sqlConnectionString="data source=.SqlExpress;initial catalog=App_SessionState;user id=sa;password=xxxxxxxx"/>

If I have not activity in browser for about 10 mins, shouldn't the Session object be removed. But after 10 mins I can still access the Session variable. Am I missing something here?

EDIT:

If I access a session variable after 10 mins as shown below shouldn't I get NULL

var myObj = Session["MyKey"] as MyClass;
mObj is not NULL after 10 mins.

View 3 Replies

Session Expires And User Is No Longer Valid?

Aug 3, 2010

I cache information about the currently logged in user in the session. This info lazy loads whenever a CurrentUser property on my global application class is used. It does this by calling GetUser() on my custom implementation of MembershipProvider, which either loads the user up from the session, or loads the user from the DB and throws the user object in the session.

How should I handle this scenario?

User logs in. Administrator deletes user (or deactivates...the point is they can't log in any more). User's session expires. User navigates to a page or makes a request, or whatever.

Currently if this scenario occurs, NullReferenceExceptions are thrown all over the place, because the ASP .NET framework calls GetUser() which returns nothing because it can't find the user in the database (and there's nothing in the session because it expired).

View 2 Replies

State Management :: How To Set Session Timeout Period For A Particular Control

Feb 17, 2011

in my application the default time out period for a session is 20 minutes. but i want to increase the sessiion time out period for a textbox.

View 4 Replies

IIS Configuration :: How To Maintain Session For A Longer Time In Server

May 7, 2015

I have added code in web.config file for session of 2 hours.

<sessionState mode="InProc" cookieless="false" timeout="120"></sessionState>

It works on local but when the code is published session expires in just 10-15 minutes.

View 1 Replies

State Management :: Session And Session Variables Not Stable In Development Server?

Oct 11, 2010

I use some session variables to get the job done(shopping cart, etc) but it is not stable..manytimes I get no items in session object and other times(refreshing the page) I get missing data...I downloaded the entire site code to my local pc and debugged it and run it succesfully without any session data missing...When I run it in the server, I get bad session again: no products in shopping cart or products with missing quantities...

The same website runs smoothly in our production server too....The problem is with our development server...

View 2 Replies

State Management :: Session Variables And Tabs / Is There A Way To Reset The Session Variable

Nov 11, 2010

I have some code in my page load event where I just want to fire once when the user opens the Browser. The only issue is if you open a new tab with the same website the session variable does not reset. Is there a way to reset the session variable when you open a new tab or do you have to take the whole web browser down for it to clear the session variable.

In Global Page:

[code]....

View 2 Replies

State Management :: Security Risk Of Longer Session Timeout Value?

Jun 18, 2010

We currently have a public-facing .Net 4 application running with the default session timeout value of 20 mins. Are there any significant security risks with lengthening that to 60 mins or longer?

View 1 Replies

Is It Safe Saving Credential Data In Session State For Short Period Of Time

Jan 1, 2011

Because of some situation , I had to save users password in session state for short period of time .it unsafe holding some important data in session state?

View 5 Replies

IIS InProc Session Variables Randomly Not Written To Session

Nov 12, 2010

There are reams of info out there about things causing InProc session to drop session objects, but that's not what's happening here. We're missing individual variables within stable InProc session objects, and are not sure whether they're not being written or being lost after a successful write. I've confirmed with WinDBG that the sessions are live and contain some, but not all, of the data written to them.

Guid g = System.Guid.NewGuid();
this.Context.Session.Add(g.ToString(), result.ImageData);
output.Write("<img src="display.aspx?id=" + g.ToString() + "">");

This code is pretty straightforward, and it works flawlessly in Test. In Production, under heavy load, though, it fails ~1% of the time. If Mr Smith visits the site and attempts to display 4 pieces of image data, 2 of them might be saved in his session and two of them be lost. The InProc session object for Mr. Smith exists. The traffic logs show he clicked 4 times, each with a different id param. But there are only 2 guids in his InProc session object, instead of 4. The 2 session objects we did capture do correspond to 2 of the id's shown in the traffic log (his 1st and 3rd clicks.) The traffic logs for his 2nd and 4th clicks, though, show a guid id that's not in his InProc session object.

Lines 1&3 of the above code obviously worked for those 2nd and 4th clicks, or he'd not have had the id in the URI for him to click. Line 2, however seems to have failed silently in some way. If any exception had been thrown, I'd expect we'd not ever have arrived at line 3. I can't see any way for the user to receive the guid id, but the session to fail to have it. The other possibility is line 2 worked successfully, but the variable later disappeared, how I cannot even imagine.

Details:
ASP.NET v3.5
IIS 6
No Web Gardening

We're running a web farm, but users constantly return to the same server. I'm researching now whether there's any way users might be slipping off to the other server.

View 2 Replies

State Management :: Expire The Session After Certain Period Of Time Which Has Been Created Once The Customer Logged In To The Page?

Feb 2, 2011

i want to know how expire the session after certain period of time which has been created once the customer logged in to the page

View 3 Replies

Web Forms :: Limitations In Using Viewstate And Session Variables

Jul 17, 2010

i have deployed my website on a particular server. i have some limitations in using viewstate and session variables. those pages in which i have used ViewState variables (for storing some information), i user accesses that page and does not do any activity for 5 minutes and if after 5 minutes he does any kind of activity (click on Link or button etc) then he receives following error: "Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster."

how i can avoid above error? another problem is with session. My session expires just after 2-3 minutes. What should i do for maintaining session for long time? i can not use cookies, as if user has disabled the cookies then my website will not work...

View 2 Replies

Web Forms :: Session Variables Value Lost On Page Refresh?

Jul 27, 2010

I am developing an application using Visual Studio 2010 and SQLServer 2008. My application has two pages and the first page contains a GridView with all the records "User Administration" and when user click on any Username (template field ->linkbutton) I read the USERID like this.

Session["UserID"] = e.commandArgument;
Response.Redirect("UserOperations.aspx");

which takes it to the Data Entry page where user updates the information and save the data.

The problem i am facing is that when I hit the browser REFRESH button couple of times the session variables looses the value which is trouble for me as I am using Session Variables for different purposes.

View 10 Replies

Web Forms :: Session Variables Are Accessible To Multiple Users?

Oct 8, 2010

I have an asp.net website in which users can submit reports. Another tester and I tested this page at the same time and when I went to review the information I submitted, it displayed information that I didn't submit. It displayed the info submitted from the other user.

I use session variables for these values. I don't understand how this happened? What can I do so each user can individually submit their information without overlapping some one else's information? The plan is for multiple users to be able to use this page to submit their weekly layer reports.

The first example of code is how I add the session variables from the textboxes.

[Code]....

The second one is how I display them in labels on a confirmation page.

[Code]....

View 16 Replies

Web Forms :: How To Keep Session Active For Long Duration

Jun 16, 2015

I want keep session active

How to change this example to keep session active? [URL]

View 1 Replies

Web Forms :: Post Data To External Page And Set Session Variables

Aug 17, 2010

I have an app which has a form that used to use AutoPostBack rigged controls (dropdowns, radiobuttons etc.) in an updatepanel, and I used to set session values on each postback. I posted the form using PostBackUrl to an external page, using a bit of javascript OnClientClick to copy my data into meaningfully named hidden fields.

Now, I've had to rewrite the AutoPostBack-ing controls so that all the cascading dropdown work and date calculation etc. is done in JavaScript, and not in C# - no more postbacks, no more updatepanel.

This means I've lost the ability to set my session values on postback. Can anyone think of a solution for setting these before I post my form? I need to set the session variables, plus post (querystrings are not an option) to the external page with the values from my form - and actually send the user to the external page, too.

View 2 Replies

Forms Data Controls :: Populating ListView With Session Variables?

Nov 27, 2010

I can get selected values from my first page with session. In my second page i want to populate product details side by side in listview with this values. How can i do it?

here is my seconde page code behind in VB

[Code]....

View 8 Replies

Web Forms :: SiteMap & Master Page: Set Session Variables And Dynamic URL's

Jul 6, 2010

I have a web application that contains a MasterPage and a Web.sitemap file for the navigation. I am loading the navigation into an <asp:Repeater> control and I associating it with <asp:LinkButton>; something like this:

[Code]....

I have two issues:

Setting Session Variables: I'd like to set some session variables when any menu item is clicked.Dynamic Url: Once the Session variables are set, I'd like to set the url dynamically after the Session variable is set The thing is, I'd like to use the same aspx file for two different menu items, and I'd also like to set some session variables at the time of menu selection. I am aware that I cannot use the same url when I define the url in the web.sitemap file.

View 2 Replies

Web Forms :: Store Large Data Using DataTables In Session Variables?

Apr 30, 2013

if i want to get multiple values from database and pass this dataset to another page can we use session to store the dataset values..i knw we can..but some one says that its not a gud approach..this will cause server process down..is it true?if it so then wat are all the other ways to do that?

View 1 Replies

Web Forms :: Persist Data Across Event Calls Without Using Session / Application Variables

Oct 26, 2010

If I have a 2 control load events and one page load event subs and the control1_Load events fires first, can I lookup some database things and persist them? I would like to use the persisted data in the other two events when they fire. Normally I've been using session variables , is there a better way?

View 3 Replies

Forms Data Controls :: Get Product Details From Northwind With Session Variables

Nov 28, 2010

i have a first page and user selecting some products. Passind with session. Retrieving from first page. And in this point i want to connecting my northwind db and display selected products detail side by side in my second page. (listview or datalist) here is my second page codebehind.

[Code]....

View 3 Replies

C# - Facebook API Errors With "Session Key Invalid Or No Longer Valid"?

Mar 10, 2010

Doing some work with Facebook connect/the RESTful API and for some reason i keep getting this error

Session key invalid or no longer valid As far as i can tell im authenticating correctly. Getting the session key from the cookie after the facebook connect dialog pops up and the user logs in. Then i open up the extended permissions dialog to allow posting events and offline access. But then if the user was to logout of facebook the session key becomes unusable. What am i doing wrong here? Is there any good examples of doing this with ASP.NET/C#?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved