Our system allows the uploads of files, it will also automatically log out a user if there is no activity for 10 minutes. The problem is this, a user entered the system, started to upload a file and then left the computer. Since there was no activity for 10 minutes the user was automatically logged off, which interrupted the process of transferring the file. Is there anyway of preventing a user being logged out if there is an active process running?
Below are the lines of code definining the period of time before being logged off, and the timeout time for the upload process. Thanks.
<
forms loginUrl="AutorizationChecker.aspx" protection="Validation" timeout="10"/>
<
httpRuntime maxRequestLength="102400" executionTimeout="3600"/>

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
<telerik:RadWindow runat="server" Behavior="Default" InitialBehavior="None" Left=""
Modal="True" NavigateUrl="GroupSearchPopup.aspx" OpenerElementID="<%# lnkGroupSearch.ClientID %>"
Style="display: none;" ReloadOnShow="true" ClientCallBackFunction="OnGroupCallback"
Title="Donation Group Search" Top="" Width="450px" Height="300px" ID="rwGroupSearch">
</telerik:RadWindow>
<telerik:RadWindow ID="rwDonorSearch" runat="server" Behavior="Default" Width="550px"
Height="500px" InitialBehavior="None" Left="" Modal="True" NavigateUrl="DonorSearchPopup.aspx"
ReloadOnShow="true" OnClientClose="OnDonorSearchClose" Style="display: none;"
Top="" OpenerElementID="<%# lnkPersonSelect.ClientID %>"
OnClientDragEnd="OnClientDragEnd">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
Parent client side code to handle the Window close
function OnDonorSearchClose(sender, eventArgs) {
alert(
"action on close = " & eventArgs);
oValue = eventArgs;
if (oValue.action > 0) {
// Set a hidden field to the value
document.getElementById(
'<%= Me.hfPersonID.ClientID %>').Value = oValue;
document.getElementById(
'<%= Me.btnScriptUpdate.ClientID %>').click();
}
}
Modal window client code
function CloseWithArg(sender, eventArg) {
var currentWindow = GetRadWindow();
alert(
"Arg = " + eventArg);
currentWindow.argument = eventArg;
currentWindow.close();
}
The alert in the modal CloseWithArg function displays the correct value
but the alert on the parent OnDonorSearchClose function displays only a 0. Even the text portion of the alert is not displayed.| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title>Untitled Page</title> |
| </head> |
| <body> |
| <script type="text/javascript"> |
| function firePostBack(arg) |
| { |
| $find('<%=ajaxManager.ClientID %>').ajaxRequest(arg); |
| } |
| </script> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager1" runat="server" /> |
| <div> |
| <telerik:RadAjaxManager OnAjaxRequest="ajaxManager_AjaxRequest" ID="ajaxManager" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="ajaxManager"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="grid" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| </div> |
| <telerik:RadGrid runat="server" ID="grid" OnNeedDataSource="grid_NeedDataSource"> |
| <MasterTableView AutoGenerateColumns="false"> |
| <Columns> |
| <telerik:GridBoundColumn DataField="col1" HeaderText="Col1"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="col2" HeaderText="Col1"></telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <a href="#" onclick="firePostBack('1');return false;">Fire</a> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| using System.Net; |
| using System.Collections.Generic; |
| using Telerik.Web.UI; |
| public partial class _Default : System.Web.UI.Page |
| { |
| protected void grid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
| { |
| DataTable table = new DataTable(); |
| table.Columns.Add("col1"); |
| table.Columns.Add("col2"); |
| table.Rows.Add("data1", "data2"); |
| table.Rows.Add("data3", "data4"); |
| table.Rows.Add("data5", "data6"); |
| grid.DataSource = table; |
| } |
| protected void ajaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e) |
| { |
| grid.Columns.FindByUniqueName("col2").Visible = !grid.Columns.FindByUniqueName("col2").Visible; |
| } |
| } |