Re: Page Timeout

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Jul 11, 9:51 pm, "Brandon Owensby" <1...@xxxxxxx> wrote:
We may end up having to go with the no caching policy and I had already
tested that and it worked but my boss prefers the timeout approach. Can you
think of any reason why it wouldn't work for me? I seem to be following the
instructions found in every place I've looked for setting up the
HttpCachePolicy. There wouldn't be a reason why testing it with the server
and the client being the same computer would affect anything would it?

Thanks,
Brandon

"nahid" <nahid...@xxxxxxxxx> wrote in message

news:1184107566.378709.25090@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



On Jul 11, 3:32 am, "Brandon Owensby" <1...@xxxxxxx> wrote:
I am using ASP.NET 2.0 and programming in C#. I am trying to make it so
that
the secure pages in my web application time out in the browsers cache
such
that hitting the back button won't show the page just because someone hit
the back button. I've seemingly done everything it says in the help
about
the Cache property of Response. The code I used is below and it still
seems to allow me to hit the back button and see the previous page event
after I have waited longer than the timeout period.

Thanks for any help you can provide,
Brandon

this.Response.Cache.SetExpires(DateTime.Now.AddSeconds(5));

this.Response.Cache.SetCacheability(HttpCacheability.Public);

this.Response.Cache.SetValidUntilExpires(false);

if you have no problem with permanetly off cache then try this

this.Response.Cache.SetCacheability(HttpCacheability.nocache);

or check it
http://authors.aspalliance.com/aspxtreme/webapps/settingoutputcachelo...

hope this help

nahid
http://nahidulkibria.blogspot.com/
http://www.kaz.com.bd- Hide quoted text -

- Show quoted text -

well,
then forgot cache use session time out, in each of your secure pages
add following code. it detect new session and redirect to another page

protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
if (Context.Session != null)
{
if (Context.Session.IsNewSession)
{
string sCookieHeader =
Page.Request.Headers["Cookie"];
if ((null != sCookieHeader) &&
(sCookieHeader.IndexOf("ASP.NET_SessionId") >= 0))
{
//optional
// if (Page.Request.IsAuthenticated)
// {
// FormsAuthentication.SignOut();
// }

Page.Response.Redirect("Sessiontimeout.aspx");
}
}
}
}
}

not in error. aspx page do some java script magic.

<HTML>
<HEAD>
<SCRIPT>
function back()
{
window.location="Sessiontimeout.aspx";
}
</SCRIPT>
</HEAD>
<BODY onbeforeunload="back()">
</BODY>
</HTML>

now if anytime session expire user come in Sessiontimeout.aspx and
can't go back.

calution do not apply it in home page.

hope help ,,,,let me know it you can collect better idea

nahid
http://nahidulkibria.blogspot.com/
http://www.kaz.com.bd



.



Relevant Pages

  • Re: Sessions expire too soon
    ... session timeout. ... However we found the KB324772 in msdn that explains the reason, ... >> want a big session timeout. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Application Pool timouts.
    ... a) From what i understand, the application pool timeout is the timeout for ... an idle session which is created by a browser. ... is idle for 20 minutes or longer the problems occur. ... Application Pool's w3wp.exe process to be shutdown by IIS when no requests ...
    (microsoft.public.inetserver.iis.security)
  • Re: How do I change the session timeout?
    ... A session will last for as long a period as you set in ... That's set in the forms timeout property. ... You will see that the logged-in period changes to match the number of minutes you specify. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SQLCommandTimeout
    ... to set the value for the session? ... designer) you can set the Command Timeout value there. ... I am just using the DataSource, configured to use my stored procedure, ... I found out about the SQLCommandTimeout Property that can be used to ...
    (microsoft.public.dotnet.general)
  • Full Disclosure for SQL-Ledger vulnerability CVE-2006-4244
    ... I have received many requests from security professions responsible for the ... Nor has he even expressed a substantive willingness to work with us to fix the problem. ... SQL-Ledger uses a fundamentally flawed approach to session authentication. ... For this reason, anybody can list login names and attempt to ...
    (Bugtraq)