UIP only works when trace is enabled. RRS feed

  • Question

  • User846181745 posted
    UIP is only working for me when I have tracing enabled in the system.web section of web.config and PageOutput is set to true. When I set trace enabled=false and PageOutput=false, then UIP no longer enforces the back button. Has anyone seen anything like this before? Help!
    Friday, October 29, 2004 5:01 PM

All replies

  • User846181745 posted

    I guess I should follow up on my post in case someone else has the same problem in the future.  The reason UIP was only working when trace was enabled was because tracing forces each page to be loaded every time it is hit.  When tracing is off, pages are loaded from the cache when the back button is hit.  I resolved this issue by preventing my pages from being cached.  This was accomplished by adding the following code to the base page class that extends WebFormView:

    override protected void OnInit(EventArgs e)


       System.Web.HttpContext.Current.Response.Cache.SetCacheability( HttpCacheability.NoCache );

       System.Web.HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory( false );

       System.Web.HttpContext.Current.Response.Cache.SetNoStore( );

       base.OnInit( e );


    Friday, April 29, 2005 12:53 PM