special authentication

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

  1. #1

    Default special authentication

    Hi!

    My problem is quiet simple, but a solution seems to be difficult(for
    me):
    I've a group of users for my asp.net webapplication. In case of a
    login the User should be authenticated automaticly (this means the
    application should verify if he's allowed to use it).

    I want to get the windows username from the client and look up in an
    oracle database weather the user is allowed to act with the webapp. If
    he isn't the Application will redirect to an error-message.

    But it seems to be hard to get the windows-user.

    I've tried to set the authentication form on "Windows" in the
    Web.config-file

    In the code behind I try to get the following value:

    name = Page.User.Identity.Name

    but that doesn't work.
    Does any body have an idea to solve this problem?

    Regards

    Peter
    Peter Kornills Guest

  2. Similar Questions and Discussions

    1. Accessing htm files without authentication (forms authentication)
      I have application with forms authentication. All works fine. When user opens .aspx file gets login form, login and then get the .aspx page. But...
    2. ASP.Net Forms authentication with basic authentication popup
      Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user...
    3. Forms authentication then redirection to a secure web with NT authentication?
      Hi, I want to allow access to particular secured intranet web sites. These intranet are stored in sharepoint (2003 version) Actually I've...
    4. Authentication ticket, cookieless, forms authentication?
      Hi. I want to use Forms Authentication, cookieless. The issue is setting the Authentication Ticket without using cookies (!) That is, the...
    5. Forms authentication with Windows authentication
      Hi, I have an ASP.NET web site that uses IIS Basic Authentication and accesses an OLAP Server at various stages. The OLAP Server authentication...
  3. #2

    Default Re: special authentication

    If you want to use Windows authentication in ASP.NET, you need to disable
    anonymous access in IIS and enable IWA, Digest or Basic. Have you done
    that?

    Once you do, Page,User.Identity.Name should return the current Windows user
    and you can use all of the built in mechanisms for authorization that you
    want or roll your own.

    Joe K.

    "Peter Kornills" <peter.kornills@web.de> wrote in message
    news:7d1b15ef.0502220641.508434db@posting.google.c om...
    > Hi!
    >
    > My problem is quiet simple, but a solution seems to be difficult(for
    > me):
    > I've a group of users for my asp.net webapplication. In case of a
    > login the User should be authenticated automaticly (this means the
    > application should verify if he's allowed to use it).
    >
    > I want to get the windows username from the client and look up in an
    > oracle database weather the user is allowed to act with the webapp. If
    > he isn't the Application will redirect to an error-message.
    >
    > But it seems to be hard to get the windows-user.
    >
    > I've tried to set the authentication form on "Windows" in the
    > Web.config-file
    >
    > In the code behind I try to get the following value:
    >
    > name = Page.User.Identity.Name
    >
    > but that doesn't work.
    > Does any body have an idea to solve this problem?
    >
    > Regards
    >
    > Peter

    Joe Kaplan \(MVP - ADSI\) Guest

  4. #3

    Default Re: special authentication

    On 22 Feb 2005 06:41:44 -0800, [email]peter.kornills@web.de[/email] (Peter Kornills) wrote:

    ¤ Hi!
    ¤
    ¤ My problem is quiet simple, but a solution seems to be difficult(for
    ¤ me):
    ¤ I've a group of users for my asp.net webapplication. In case of a
    ¤ login the User should be authenticated automaticly (this means the
    ¤ application should verify if he's allowed to use it).
    ¤
    ¤ I want to get the windows username from the client and look up in an
    ¤ oracle database weather the user is allowed to act with the webapp. If
    ¤ he isn't the Application will redirect to an error-message.
    ¤
    ¤ But it seems to be hard to get the windows-user.
    ¤
    ¤ I've tried to set the authentication form on "Windows" in the
    ¤ Web.config-file
    ¤
    ¤ In the code behind I try to get the following value:
    ¤
    ¤ name = Page.User.Identity.Name
    ¤
    ¤ but that doesn't work.
    ¤ Does any body have an idea to solve this problem?
    ¤
    ¤ Regards
    ¤
    ¤ Peter

    In addition to what Joe mentioned you also need to enable impersonation.

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconimpersonation.asp[/url]


    Paul ~~~ [email]pclement@ameritech.net[/email]
    Microsoft MVP (Visual Basic)
    Paul Clement Guest

  5. #4

    Default Re: special authentication


    "Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message
    news:d50n11tamp2otuj720o9rp1dnucuv8fpja@4ax.com...
    > On 22 Feb 2005 06:41:44 -0800, [email]peter.kornills@web.de[/email] (Peter Kornills)
    > wrote:
    >
    > ¤ Hi!
    > ¤
    > ¤ My problem is quiet simple, but a solution seems to be difficult(for
    > ¤ me):
    > ¤ I've a group of users for my asp.net webapplication. In case of a
    > ¤ login the User should be authenticated automaticly (this means the
    > ¤ application should verify if he's allowed to use it).
    > ¤
    > ¤ I want to get the windows username from the client and look up in an
    > ¤ oracle database weather the user is allowed to act with the webapp. If
    > ¤ he isn't the Application will redirect to an error-message.
    > ¤
    > ¤ But it seems to be hard to get the windows-user.
    > ¤
    > ¤ I've tried to set the authentication form on "Windows" in the
    > ¤ Web.config-file
    > ¤
    > ¤ In the code behind I try to get the following value:
    > ¤
    > ¤ name = Page.User.Identity.Name
    > ¤
    > ¤ but that doesn't work.
    > ¤ Does any body have an idea to solve this problem?
    > ¤
    > ¤ Regards
    > ¤
    > ¤ Peter
    >
    > In addition to what Joe mentioned you also need to enable impersonation.
    >
    > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconimpersonation.asp[/url]
    >
    >
    > Paul ~~~ [email]pclement@ameritech.net[/email]
    > Microsoft MVP (Visual Basic)
    Why?

    All he wants to do is check to see who the authenticated user is.
    Context.User.Identity.Name (or Page.User.Identity.Name) will be the
    authenticated use regardless of what the setting for impersonation is.
    Impersonation is only needed if he needs to execute code as the
    authenticated user.

    Joe K.


    Joe Kaplan \(MVP - ADSI\) Guest

  6. #5

    Default Re: special authentication

    On Tue, 22 Feb 2005 13:31:46 -0600, "Joe Kaplan \(MVP - ADSI\)"
    <joseph.e.kaplan@removethis.accenture.com> wrote:

    ¤
    ¤ "Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message
    ¤ news:d50n11tamp2otuj720o9rp1dnucuv8fpja@4ax.com...
    ¤ > On 22 Feb 2005 06:41:44 -0800, [email]peter.kornills@web.de[/email] (Peter Kornills)
    ¤ > wrote:
    ¤ >
    ¤ > ¤ Hi!
    ¤ > ¤
    ¤ > ¤ My problem is quiet simple, but a solution seems to be difficult(for
    ¤ > ¤ me):
    ¤ > ¤ I've a group of users for my asp.net webapplication. In case of a
    ¤ > ¤ login the User should be authenticated automaticly (this means the
    ¤ > ¤ application should verify if he's allowed to use it).
    ¤ > ¤
    ¤ > ¤ I want to get the windows username from the client and look up in an
    ¤ > ¤ oracle database weather the user is allowed to act with the webapp. If
    ¤ > ¤ he isn't the Application will redirect to an error-message.
    ¤ > ¤
    ¤ > ¤ But it seems to be hard to get the windows-user.
    ¤ > ¤
    ¤ > ¤ I've tried to set the authentication form on "Windows" in the
    ¤ > ¤ Web.config-file
    ¤ > ¤
    ¤ > ¤ In the code behind I try to get the following value:
    ¤ > ¤
    ¤ > ¤ name = Page.User.Identity.Name
    ¤ > ¤
    ¤ > ¤ but that doesn't work.
    ¤ > ¤ Does any body have an idea to solve this problem?
    ¤ > ¤
    ¤ > ¤ Regards
    ¤ > ¤
    ¤ > ¤ Peter
    ¤ >
    ¤ > In addition to what Joe mentioned you also need to enable impersonation.
    ¤ >
    ¤ > [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconimpersonation.asp[/url]
    ¤ >
    ¤ >
    ¤ > Paul ~~~ [email]pclement@ameritech.net[/email]
    ¤ > Microsoft MVP (Visual Basic)
    ¤
    ¤ Why?
    ¤
    ¤ All he wants to do is check to see who the authenticated user is.
    ¤ Context.User.Identity.Name (or Page.User.Identity.Name) will be the
    ¤ authenticated use regardless of what the setting for impersonation is.
    ¤ Impersonation is only needed if he needs to execute code as the
    ¤ authenticated user.
    ¤
    ¤ Joe K.
    ¤

    Yes, Joe, you're correct. I misread his post and thought he was using integrated security with
    Oracle.


    Paul ~~~ [email]pclement@ameritech.net[/email]
    Microsoft MVP (Visual Basic)
    Paul Clement Guest

  7. #6

    Default Re: special authentication

    It works!

    thanks for your help Paul and Joe

    Regards Peter
    Peter Kornills 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