Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Asp profile page, accessability

  • 24-04-2007 4:36pm
    #1
    Closed Accounts Posts: 381 ✭✭


    Sorry bout the title!

    ok i am so lost. I have tryed to do it , looked it up (found nothing but not sure what i am looking for is called), asked my teachers (said not sure how to do it in asp) etc....

    Basicly i am trying to set up a small site like myspace or bebo (system wise not content) i want to let people register , then let them have thier own profile. the problem is how do i let a person have thier own profile page that is accessable by other people.

    Now I have the profile set up and when you login, you go to your profile and see all the information you put in, (taken from a database)

    but how do you do this >>>>>>

    example. "www.mydomain.com/El_mariachi" would be the link to my user profile.
    when a person (doesn't have to be a member) go to this address they will see my profile.? how is this done?

    do i have to create a new page for ever user? (doesn't seem right)

    I have a feeling its to do with the Users unique ID but tbh i dont know much more that that.
    (Evey member that registers gets a unique user ID)

    examples please or what the name of this method or what this is called either to help me do this

    Thank you¬


Comments

  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    You could do it in a slight way such as www.domain.com/?username with the default doc set as to show the information based on that username.


  • Closed Accounts Posts: 381 ✭✭El_mariachi


    Ginger wrote:
    You could do it in a slight way such as www.domain.com/?username with the default doc set as to show the information based on that username.

    yea i tryed that but how does it work? code wise?

    any idea what its called and i could research it on the web instead of been a pain! :P


  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    You could create a vdir when you create the user with a linked page that uses something like Server.Transfer to show the details...


  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    It will make more sense to you if you think of it in terms of the database instead of the website. What you have here is basically different views of the data based on a user-level.

    Suppose we have 3 users; an admin, and two bog-standard users. When they log in the site queries their user level and allows them access to other sites based on their user-level, but it also limits their access based on these user-levels. So the admin can see both other users pages, his/her own page and can edit (or not as you prefer) these pages. The other users can only view the other users pages and only if they are given a link to it (as is the case in myspace or bebo, you are given the links to your friends sites by them when they ask to be your friend, but the site also has links to a random sampling on the main page). They have full access to their own dataset and can add, edit, delete etc.

    You have 2 options re the users log-in page. You can write a generic page that is delimited as follows:

    <% if Session("user_name") == cur_page_author then
    blah ..
    else
    blah ..
    end if %>

    And put case where the cur_page_author in the if clause and the case where the user is not the cur_page_author in the else clause. The link that leads to the site will be basically a get to the asp page with a sessionid and the curpage author something like:

    www.sample-site.com/userpage.asp?cur_page_author=ron_darrell&sessionid=hjsdj12930812873kdjsakljd

    even if the end-user changes the cur_page_author tosomething else the asp code will only allow him/her to full access to their own page and not someone elses.

    I probably haven't explained this too well but if you have any questions pm me.

    Regards,
    -RD


  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    but how do you do this >>>>>>

    example. "www.mydomain.com/El_mariachi" would be the link to my user profile.
    when a person (doesn't have to be a member) go to this address they will see my profile.? how is this done?

    do i have to create a new page for ever user? (doesn't seem right)

    This is called URL rewriting. In ASP.Net you would create a HttpModule and using the web.config put it in the page pipeline. You would capture the request, perform a database lookup and do a server.transfer to a page passing parameters like userid leaving the original URL in place so the user never even knows.

    It's trickier to do in classic ASP. You need to to the URL rewriting in an ISAPI fillter which you either write, normally in C++, could also be Delphi I think, or you use a prebuilt one with configuration files. Here is an example http://www.motobit.com/help/url-replacer-rewriter/iis-mod-rewrite.asp


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    In Asp.Net 2.0 you can just put the URL mappings directly into the web.config file. A bit of OT I know but seeng as somebody mentioned it.


  • Registered Users, Registered Users 2 Posts: 21,263 ✭✭✭✭Eoin


    Could a custom 404 ASP script do the trick? I'd imagine it could pick up whatever's after the domain name


Advertisement