Wednesday, June 26, 2013

Disabling Browsers Back Functionality to logout in asp .net

 

In page_load of login page add

      System.Web.Security.FormsAuthentication.SignOut();
      Session.Clear();
      Session.Abandon();
In page_load of master page add:
      Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
      Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
      Response.Cache.SetNoStore();

Configuring IIS 7 for asp.net 4 web hosting

Steps:
1.Type appwiz.cpl in run.
2. Install IIS from Turn windows Features on or off.
3. Install .net 4.0.
4.Registering .net framework 4.0:
      i. run command prompt as Administrator.
     ii. C:\windiws\Microsoft.net\framework\V4.0.30319>aspnet_regiis -i
5.Add website in inetmgr(IIS manager).
6.make sure Application Pool has framework V4.0.
browse your website.