Click here to Skip to main content
15,881,588 members
Articles / Web Development / ASP.NET

Detecting Session Timeout and Redirect to HomePage

Rate me:
Please Sign up or sign in to vote.
2.88/5 (11 votes)
13 Sep 20061 min read 172.6K   1.7K   27  
Application that Detects when a Session has timed and redirect user to Home Page
<VisualStudioProject>
    <VisualBasic
        ProjectType = "Web"
        ProductVersion = "7.10.3077"
        SchemaVersion = "2.0"
        ProjectGuid = "{2714F157-6B0E-4AB5-A692-97461469F192}"
    >
        <Build>
            <Settings
                ApplicationIcon = ""
                AssemblyKeyContainerName = ""
                AssemblyName = "Test_SessionTimeOutRecovery"
                AssemblyOriginatorKeyFile = ""
                AssemblyOriginatorKeyMode = "None"
                DefaultClientScript = "JScript"
                DefaultHTMLPageLayout = "Grid"
                DefaultTargetSchema = "IE50"
                DelaySign = "false"
                OutputType = "Library"
                OptionCompare = "Binary"
                OptionExplicit = "On"
                OptionStrict = "Off"
                RootNamespace = "Test_SessionTimeOutRecovery"
                StartupObject = ""
            >
                <Config
                    Name = "Debug"
                    BaseAddress = "285212672"
                    ConfigurationOverrideFile = ""
                    DefineConstants = ""
                    DefineDebug = "true"
                    DefineTrace = "true"
                    DebugSymbols = "true"
                    IncrementalBuild = "true"
                    Optimize = "false"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "1"
                />
                <Config
                    Name = "Release"
                    BaseAddress = "285212672"
                    ConfigurationOverrideFile = ""
                    DefineConstants = ""
                    DefineDebug = "false"
                    DefineTrace = "true"
                    DebugSymbols = "false"
                    IncrementalBuild = "false"
                    Optimize = "true"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "1"
                />
            </Settings>
            <References>
                <Reference
                    Name = "System"
                    AssemblyName = "System"
                />
                <Reference
                    Name = "System.Data"
                    AssemblyName = "System.Data"
                />
                <Reference
                    Name = "System.Drawing"
                    AssemblyName = "System.Drawing"
                />
                <Reference
                    Name = "System.Web"
                    AssemblyName = "System.Web"
                />
                <Reference
                    Name = "System.XML"
                    AssemblyName = "System.Xml"
                />
                <Reference
                    Name = "SessionTimeOutBaseClassDLL"
                    AssemblyName = "SessionTimeOutBaseClassDLL"
                    HintPath = "..\SessionTimeOutBaseClassDLL\bin\SessionTimeOutBaseClassDLL.dll"
                />
            </References>
            <Imports>
                <Import Namespace = "Microsoft.VisualBasic" />
                <Import Namespace = "System" />
                <Import Namespace = "System.Collections" />
                <Import Namespace = "System.Configuration" />
                <Import Namespace = "System.Data" />
                <Import Namespace = "System.Drawing" />
                <Import Namespace = "System.Web" />
                <Import Namespace = "System.Web.UI" />
                <Import Namespace = "System.Web.UI.HtmlControls" />
                <Import Namespace = "System.Web.UI.WebControls" />
            </Imports>
        </Build>
        <Files>
            <Include>
                <File
                    RelPath = "AssemblyInfo.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Global.asax"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Global.asax.vb"
                    DependentUpon = "Global.asax"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Global.asax.resx"
                    DependentUpon = "Global.asax.vb"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Home.aspx"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Home.aspx.vb"
                    DependentUpon = "Home.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Home.aspx.resx"
                    DependentUpon = "Home.aspx.vb"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Login.aspx"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Login.aspx.vb"
                    DependentUpon = "Login.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Login.aspx.resx"
                    DependentUpon = "Login.aspx.vb"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Page1.aspx"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Page1.aspx.vb"
                    DependentUpon = "Page1.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Page1.aspx.resx"
                    DependentUpon = "Page1.aspx.vb"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "PageBase.aspx"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "PageBase.aspx.vb"
                    DependentUpon = "PageBase.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "PageBase.aspx.resx"
                    DependentUpon = "PageBase.aspx.vb"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Styles.css"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Web.config"
                    BuildAction = "Content"
                />
            </Include>
        </Files>
    </VisualBasic>
</VisualStudioProject>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions