SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Retrict User from Accessing the page directly from browser

    We have a web application. Under the main DNS we have different applications. For Example My Main DNS is http://www.sitepoint.com/ , I have different applications under this like http://www.sitepoint.com/supplier/ and http://www.sitepoint.com/XYZ/main.asp.

    The application XYZ is developed in ASP. Now I have to retrict the user if he directly access the application with the page under the folder XYZ as http://www.sitepoint.com/XYZ/main.asp. Actually the main DNS can be login through the other portal with proper credentials. The ASP project i mentioned can be accessed when the user came through proper credentils. I have to retrict him if he tries to access the page directly. Please help me how can i achieve this ASP.

    As i worked in ASp very long back, not able to do thid. Please help me.

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you're on the same domain and server (cluster) then you could use Sessions to store the login credentials. Then in main.asp (or any other page) simply check for the login credentials and Response.Redirect to the login page if they are not set.

    http://www.devx.com/tips/Tip/13603 ... shows a simple example.
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Member
    Join Date
    Jan 2014
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use single include file like header (or footer) where you have this call for session variable like user name or password or what ever your site passes as verified credentials.
    That will help you to do maintenance easier and keep tight grip on app.
    If credentials passes - let it play; if not -redirect to login page.

  4. #4
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Why are you resurfacing lots of old, long-dead threads?
    Ian Anderson
    www.siteguru.co.uk


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •