Ask a Question related to ASP.NET Security, Design and Development.
-
Peter Kornills #1
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
-
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... -
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... -
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... -
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... -
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... -
Joe Kaplan \(MVP - ADSI\) #2
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
-
Paul Clement #3
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
-
Joe Kaplan \(MVP - ADSI\) #4
Re: special authentication
"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message
news:d50n11tamp2otuj720o9rp1dnucuv8fpja@4ax.com...Why?> 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)
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
-
Paul Clement #5
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
-
Peter Kornills #6
Re: special authentication
It works!
thanks for your help Paul and Joe
Regards Peter
Peter Kornills Guest



Reply With Quote

