Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. copy and paste url

copy and paste url

Scheduled Pinned Locked Moved ASP.NET
help
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kmanisha
    wrote on last edited by
    #1

    hi i have problem for which i have been struggling fro last two days i hope u can slove this consider a scenario 1> user login using his userid and password 2> he get his required page 3> user copy the url 4> user logout 5> he paste the url 6> he is getting page without any validations i am using formsauthetication.signout session.abdoan session.clear i have written validation code on page_init event which does not fire when u copy and paste url i think i am able to explain my problem please help me its urgent thanks

    S 1 Reply Last reply
    0
    • K kmanisha

      hi i have problem for which i have been struggling fro last two days i hope u can slove this consider a scenario 1> user login using his userid and password 2> he get his required page 3> user copy the url 4> user logout 5> he paste the url 6> he is getting page without any validations i am using formsauthetication.signout session.abdoan session.clear i have written validation code on page_init event which does not fire when u copy and paste url i think i am able to explain my problem please help me its urgent thanks

      S Offline
      S Offline
      Suman Singh
      wrote on last edited by
      #2

      a very simple solution may be 1. create a session let say, user 2. when you are checking the username and password from database and if you find the record, Assign value of userid to the session 3. On each restricted page or on the master page place this code: if(Session["user"].ToString() == "") { Response.Redirect("default.aspx"); } 4. On logout assign blank to this session and remove it... Hopefully it will solve your problem. Suman Singh

      C K 2 Replies Last reply
      0
      • S Suman Singh

        a very simple solution may be 1. create a session let say, user 2. when you are checking the username and password from database and if you find the record, Assign value of userid to the session 3. On each restricted page or on the master page place this code: if(Session["user"].ToString() == "") { Response.Redirect("default.aspx"); } 4. On logout assign blank to this session and remove it... Hopefully it will solve your problem. Suman Singh

        C Offline
        C Offline
        cnr369
        wrote on last edited by
        #3

        I think it may help u. write the below code in default page in pageload Session.Remove(Session.SessionID); FormsAuthentication.SignOut(); Context.User = null; Response.Redirect("./.../Login.aspx"); definitely it will help u...already i checked this... rgds, cnr369.

        1 Reply Last reply
        0
        • S Suman Singh

          a very simple solution may be 1. create a session let say, user 2. when you are checking the username and password from database and if you find the record, Assign value of userid to the session 3. On each restricted page or on the master page place this code: if(Session["user"].ToString() == "") { Response.Redirect("default.aspx"); } 4. On logout assign blank to this session and remove it... Hopefully it will solve your problem. Suman Singh

          K Offline
          K Offline
          kmanisha
          wrote on last edited by
          #4

          hi thanks for replying i already done validation on page-init event using session and userid my problem is in given scenario form_init event doesn't fire thanks

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups