Ask a Question related to ASP.NET Security, Design and Development.
-
Tjoep #1
windows authentication and mssql server
Hi,
I've got this asp project, Authentication mode is set to Windows and the
identity impersonate is enabled.
Is there any way to find out what user is logged in? I was thinking about
something like the User.Identity object. But when i check the User.Identity,
it is logged-in as an annonymous user (spelling?)
The main thing I want to do with my project is the following:
a user opens the page and authenticates with his windows password, then he
is shown all his projects. That is, the projects he is allowed to see. All
the data of the projects are stored in an mssql database.We connect to the
database with a connectionstring that states "Trusted_Connection=true".
But somehow al the users see every project from the database.
Any help is appreciated.
best regards,
Bart
Tjoep Guest
-
Authentication on Windows NT Server w/IIS 5 or 6
I changed the authentication files on my production server to add in some new session variables. I did this using Dreamweaver 8, using my personal... -
Hybrid sql server and asp.net windows authentication
I have an asp.net web application that executes stored procedures on SQL Server 2000 on the backend and displays the results of this stored procs on... -
connecting to sql server with windows authentication
I'm confounded how difficult it is to setup a connection from an ASP.NET application to SQL Server on a different machine in the same windows domain... -
ASP.NET (IIS 6.0) Windows authentication/SQL Server problem
Hi, On Windows 2000, I use the following connection string in my ASP.NET applications: <add key="ConnectionString"... -
ASP.NET + SQL Server Windows authentication
Hey All, Trying to understand why I can not get SQL server to trust my IIS server. I have two machines set up, 1 App and 1 DB, and I'm trying to... -
Paul Clement #2
Re: windows authentication and mssql server
On Wed, 20 Apr 2005 07:09:01 -0700, "Tjoep" <Tjoep@discussions.microsoft.com> wrote:
¤ Hi,
¤
¤ I've got this asp project, Authentication mode is set to Windows and the
¤ identity impersonate is enabled.
¤ Is there any way to find out what user is logged in? I was thinking about
¤ something like the User.Identity object. But when i check the User.Identity,
¤ it is logged-in as an annonymous user (spelling?)
¤
¤ The main thing I want to do with my project is the following:
¤ a user opens the page and authenticates with his windows password, then he
¤ is shown all his projects. That is, the projects he is allowed to see. All
¤ the data of the projects are stored in an mssql database.We connect to the
¤ database with a connectionstring that states "Trusted_Connection=true".
¤
¤ But somehow al the users see every project from the database.
¤ Any help is appreciated.
Did you configure the web application (in IIS) for either Basic or Integrated Windows
authentication?
Paul
~~~~
Microsoft MVP (Visual Basic)
Paul Clement Guest
-
Dominick Baier [DevelopMentor] #3
Re: windows authentication and mssql server
Hello Tjoep,
grab a copy of ShowContexts.aspx [1] - this exactly shows you under which
identities your app is running - you know there are three ones in ASP.NET
you have to deal with -
Process Identity
Thread Identity
Context.User
[1] [url]http://www.pluralsight.com/toolcontent/show_contexts.zip[/url]
---------------------------------------
Dominick Baier - DevelopMentor
[url]http://www.leastprivilege.com[/url]
> Hi,
>
> I've got this asp project, Authentication mode is set to Windows and
> the
> identity impersonate is enabled.
> Is there any way to find out what user is logged in? I was thinking
> about
> something like the User.Identity object. But when i check the
> User.Identity,
> it is logged-in as an annonymous user (spelling?)
> The main thing I want to do with my project is the following:
> a user opens the page and authenticates with his windows password,
> then he
> is shown all his projects. That is, the projects he is allowed to see.
> All
> the data of the projects are stored in an mssql database.We connect to
> the
> database with a connectionstring that states
> "Trusted_Connection=true".
> But somehow al the users see every project from the database. Any help
> is appreciated.
>
> best regards,
> Bart
Dominick Baier [DevelopMentor] Guest
-
swat #4
Re: windows authentication and mssql server
If you have Anonymous enabled in IIS and impersonation enabled in the
config file, WindowsIdentity.GetCurrent().Name will return
IUSR_<machinename> and User.Identity.Name will be an empty string.
What you want is to get both User.Identity.Name and
WindowsIdentity.GetCurrent().Name returning the currently logged on
user. To do this, you need to disable Anonymous in IIS (and only enable
Windows Integrated) and enable impersonation in the config file.
HTH.
swat Guest
-
Tjoep #5
Re: windows authentication and mssql server
Hi all,
I found my mistake, the anonymous acces was indead enabled.
Thanks for all your quick responses. seems to me, I can now succesfully read
the identity.
Bart
Tjoep Guest



Reply With Quote

