For testing I have 1 isolated page - no masters, controls, .... My sessions are lost after about 30 seconds. I've tried setting timeout on the page itself, in web.config, both, and neither. Tried forms authentication with timeout and windows authentication. Recycle the AppPool after changes.
I can response.write from the Session_Start , but I never get any response.writes from the Session_End.
I want some efficient way that how can i display a message to user that he is about to logout after 1 minute if user is idle and doing nothing on the page for 1 mintue.
on message if user want stay online so he must click keep me online or say logout.
Using this code i want to show an modal pop up to the user that "your session will be expired within 5 minutes , Click here [BUTTON] to reset your session" , here's my code :
<asp:Button ID="btnReset" Text="Reset" runat="server" OnClick="ResetSession" /> <br /> Your Session will expire in <span id = "seconds"></span> seconds. <script type="text/javascript"> function SessionExpireAlert(timeout) { var seconds = timeout / 1000; seconds--;
i published my site to server and login users with session but this session remove after 30 seconds !!! and user page send error i used this code in web.config buy session remove again
I test my asp.net website app in my win 2000 server in Administrator user mode, the session I start (Session("user_ses") = myclass) only lasts a few seconds. But if I do the same as a 'common' user the session lasts 20 minutes, which is the time I set in web.config file:
We have developed MVC web app. We have used session value only once within the application to save the visibility.
I save the visibility selected in dropdown in session and when the page refreshes next time I set the drop down value based on session.
The code is as follows:
if (visibility == "All Investors") visibility = "All"; Session["visibility"] = visibility; if (Session["visibility"] != null ) { visibility = Session["visibility"].ToString(); }
This works well on my local in all cases. On test server , sometime I get right session value but some time I get session value which was set before the last session value, The only difference in the environment I have on local and test is local has IIS6.0 and test has IIS7.0.
In our web application we provide a way for users to switch which account/credentials (Windows identity) that should be used when making requests to external services.
This "Switch user" service works like this:
The user provides the new credentials that should be used. The application performs a "login", fetch the toke and creates a new WindowsIdentity based on the token.The created identity is placed in the session. When a page is requested and an Identity is available in session, the HttpContext.Current.User is replaced with this one. Everything works as excepted when the application is hosted in IIS6. We have verified that all request to external services is made using the new identity. When we host the application in IIS7 we run into problems however. Everything works fine until we tries to access the new identity (for example by fetching the name) and we get the following exception:
[Code]....
We have no idea why this suddenly starts to happen in IIS7.
I've got an ASP.NET MVC app running under IIS7. It's using the default in-proc session management, which, according to all that I read, should lose the users' session after an app pool recycle.It doesn't seem to be losing it though. Even an IIS reset doesn't lose the session.Has something changed in IIS7 that keeps the session alive?
I have an application running ASP.NET. I have different domains and different sub-domains. I want the domains to share session with their sub domains.
For Example, the following domains access this application:
[URL]
If a user goes to www.example1.com and print.example1.com, I want it to use the same session. If the user were to go to www.example2.com and print.example2.com, I would want it to use a different session than the *.example1.com.
The way I used to handle it was a hack in page_load that works perfectly in IIS6:
(SiteUtility.GetCookieDomain would return .example1.com or .example2.com depending on the url of the request) Unfortunately, this no longer seems to work for iis7. Each subdomain/domain a user goes to, the user gets a new session cookie.
I then found the web.config entry: '<httpCookies domain=".example1.com" />. This works great for sharing session cookie between example1.com subdomains. Unfortunately, this completely screws up session state for *.example2.com.
I've just upgraded my development machine from XP SP3 (IIS5.1) to Win7 x64 (IIS7.5)
Since doing this, my app has started to behave differently. Within it I store users' preferences/access levels using an instance of a class that I store within the Session object. This class is shown:
[Code]....
My requirement is that on each page request (other than the login page), the application should check that the Session object exists. The page data is therefore shown based on the values within the session object (e.g. which customer account they are using etc)...Previously on IIS5.1 if I was logged into the app, but made some changes to a file within App_Code, or Web.Config for example, when I then continued to use the app, I would get kicked out to the login page straight away. This is the intended behaviour. Now however, on IIS7.5, the app continues to provide access to the pages, but debugging shows that the session value has had all of its values set to 0 (zero). Therefore, the pages continue to load but the data shown is corrupted because the app no longer displays it accurately. Here is the code I use which (on IIS5.1) caught this occurence. Can anyone offer any advice on just what's now happening
I have a very strange issue, I'm using System.Data.SqlClient. to get data from a SQL Server though a stored procedure. When I test the Application at the Development and Stagging machines it works fine but when I deploy the application on the Production Server I randomly getting an SqlDataReader IndexOutOfRangeException with different column names!.The error appears in 2 requests in each 1000 request (approximative).
public static List<CountryInfo> GetAllCountries(){ List<CountryInfo> Items = new List<CountryInfo>(); try{ using (rdr = SqlHelper.ExecuteReader(Globals.ConnectionString, "unv_spGetAllCountries")) [code]...
I'm attempting to import, using VB.Net, a spreadsheet from some other users than myself. In the spreadsheet with headers, the numbers I'm importing are in the first column of the spreadsheet (Excel 2003 to 2007). I've defined my datacolumn for the column with the numbers as a "string". What's happening is the trailing zero is dropped; so 1.1 and 1.10 both appear as => 1.1.My code is attatched below.I know I'm missing something, I just don't see it!I've tried both; MicroSoft.JET.OleDb.4.0 and MicroSoft.ACE.OLEDB.12.0 but neither seems to make a difference.
When copying and pasting from a formatted Micorsoft document, the editor drops many spaces.
If I use the "Paste from MS Word (with cleanup)" feature, the document loses its formatting.
If I don't use it, many spaces get lost and the words around them get concatenated. I just downloaded the last release of the toolkit and the problem still persists.
Users are using Firefox and Chrome with the same result.
I have a webUserControl that is nested inside of another dynamically loaded usercontrol. The nested user control (harddrive) can have multiple iterations, see below for hierarchy When a postback occurs the value in the dropdownlist inside of the nested userControl is saved, but the data in the textboxes is lost. any ideas?
Hierarchy: insert.aspx [^--loads] asset.ascx [^--- loads] harddrive.ascx -- there can be multiple instances of this control inside of the asset.ascx user control
When I try to use this code in a Form View, I get an error message:
Compiler Error Message: CS0103: The name avgift_namnTextBox is not in the current context ROW: 35
Rad 33: if (dropDownlist.SelectedValue == "Other") Rad 34: { Rad 35: avgift_namnTextBox.Enabled = true; Rad 36: avgift_namnTextBox.Text = string.Empty; Rad 37: avgift_prisTextBox.Enabled = true;
This one site in particular Total Training Online has a popup window that drops from the top of the screen on the right side. How can I create that in asp.net c# 2008?
I am tring to redirect but somehow it doesnt work.
I want to redirect a user after x seconds.
Here is what I am trying:
[Code]....
Tried also rediect on codebehind, with sleep method, on PageLoad, but then, the page doesn't show...so maybe I can put this code on another page life cycle method?
actually i was displaying 10 of my products images on my home page and i want that they should rotate or change one by one after 5 seconds themselves. How can i do so by using asp.net,ajax,javascript
I have a requirement where i want compare only the date part of a DateTime Object not the seconds with the another object.I tried if(DateTime.Compare(dt1, dt2) == 0) where it compares both date and seconds, but i want only date part.
I am converting my datetime object with current date and specific time 23:59:59 as shown underneath.
[Code]....
But when I check in my sql table datetime column, it is changes seconds part of time from 59 to 00, so for instance, if I have a datetime, 2010-08-11 23:59:59, it changes this to 2010-08-11 23:59:00. How should I fix this.
I have a page called HP.aspx that has an iframe to display a presentation made up of several pages. On the last page (Movie.aspx) within the HP.aspx iframe, I want to redirect the page to Projects.aspx outside the HP.aspx iframe after 25 seconds.
I know I can use 'Response.Write("<script>window.open('~/Projects.aspx','_top');</script>");' in the Movie.aspx's codebehind to redirect the page outside the iframe, but how do I set the page load to redirect after 25 seconds.
I' know the usual way of redirect after a specific time in C# is 'Response.AddHeader("REFRESH", "25;URL=~/Projects.aspx");,' but that leaves me still within the HP.aspx iframe. I tried replaces '~/Projects.aspx' withe '<script>...</script>' but it just gave me an error still inside the HP.aspx iframe.
My asp.net mvc application, requires me to login every 20-50 seconds, i contacted the hosting provider, who says its due to recycle of pool. i have added following code to web.config.