Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Form Authentication


    Hello everyone,

    I have found a problem with form authentication method that I can't
    solve. The problem is:

    I want to use a form authentication in my application, so i set :
    <authentication mode="Forms">
    ,and
    <forms name="LoginForm" loginUrl="SM_LoginPage.aspx" protection="All">

    but the structure of my application folders is following:

    root
    |
    +CommonPages
    | + loginPage.aspx
    |
    +SysPages
    | + Sys1Pages
    | | +Page1.aspx
    | + Sys2Pages
    | +Page2.aspx
    + OtherPages
    + Page3.asp

    Because of this structure the relative path of LoginPage.aspx is
    diffrent for Page1.aspx(../../CommonPages/loginPage.aspx) and Page for
    page3.aspx(../CommonPages/loginPage.aspx). I have to set this path in
    web.config and I want to use relative path (not [url]http://.[/url]....). Is there
    any way to do this?? (sth like {root}//CommonPages/loginPage.aspx)??
    Thanks for any help

    Best Regards
    Slawek





    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    slawek xxxxx Guest

  2. Similar Questions and Discussions

    1. Form Authentication Ticket
      I've read some books and online articles on how to implement form authentication. Some taught me just to do...
    2. Form Authentication with SSL
      If I use form authentication with SSL with my web application, when I access my login page, I will go to https://www.mydomainname.com/login.aspx....
    3. authenticate win32 form client with form based authentication web services
      (Type your message here) -------------------------------- From: kitchai yong Hi, Can you tell me how i authenticate the win32 form client...
    4. Problems with form authentication
      I'm experiencing some problems with role-based forms authentication accross domain. I wanted to create an unique login page for multiple web server...
    5. Uses ASP.NET form authentication across projects?
      Basically this needs to be done so that: a) synchronize <machineKey> elements in web.config for all applications b) synchronize <authentication>...
  3. #2

    Default RE: Form Authentication

    slawek,

    Try putting loginUrl="/CommonPages/loginPage.aspx".

    Hope that helps,
    David Banister
    David Banister Guest

  4. #3

    Default Form Authentication

    Hi All,

    We will be using form authentication in out website. We have two totally
    different types of users in our site.

    Type 1
    Has 2 different roles in it

    Type 2
    Has 3 different roles in it


    The data we collect for Type 1 is very different than Type 2.

    That's why, we want to use two different forms authentication at our site.
    Just wanted to know is it possible to do it in dot net for a single website.

    Please let me know how to do it. If someone has sample code, please send it.

    Thanks in Advance,
    Anil



    Anil Guest

  5. #4

    Default RE: Form Authentication


    Dear Anil,

    You don't need to use two different authentication's for accomplishing this.
    You can use role based authorization and set all the functionalities for the
    different roles you mentioned in your post.

    Check my Article on Role based authorization in the following URL. It might
    help you.

    [url]http://aspnet_harish.blogspot.com/2004/11/setting-role-cookie-at-application.html[/url]

    It has the code to set the authentication and then play with authorization
    to show and perform different actions based on user's roles.

    Thanks.






    "Anil" wrote:
    > Hi All,
    >
    > We will be using form authentication in out website. We have two totally
    > different types of users in our site.
    >
    > Type 1
    > Has 2 different roles in it
    >
    > Type 2
    > Has 3 different roles in it
    >
    >
    > The data we collect for Type 1 is very different than Type 2.
    >
    > That's why, we want to use two different forms authentication at our site.
    > Just wanted to know is it possible to do it in dot net for a single website.
    >
    > Please let me know how to do it. If someone has sample code, please send it.
    >
    > Thanks in Advance,
    > Anil
    >
    >
    >
    >
    ranganh Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139