473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Authentication of a user

I'm searching for info on how to authenticate a user in the same way that
for example Source Safe does. I would like my system to use Windows as the
authenticator, so that the user doesn't have to log on separately to access
my system.
Nov 16 '05 #1
4 1874
Hello Peter,

Not sure why do you've given SourceSafe as the example... SourceSafe
databases maintain its own lists of users.
Anyway, I think you should take a look at the WindowsIdentity and
WindowsPrincipal classes:

using System.Security.Principal;

WindowsIdentity curUser = WindowsIdentity.GetCurrent();
bool allow = curUser.IsAuthenticated;

WindowsPrincipal membership = new WindowsPrincipal(curUser);
bool isAdmin = membership.IsInRole("BUILTIN\\Administrators");
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Peter Tragardh" <pe************@hotmail.com> wrote in message
news:Xn*********************************@207.46.24 8.16...
I'm searching for info on how to authenticate a user in the same way that
for example Source Safe does. I would like my system to use Windows as the
authenticator, so that the user doesn't have to log on separately to access my system.


Nov 16 '05 #2
I gave MSS as an example of the workflow, not an example of the technical
aspects. During my research I've learned that the term for the function
I'm looking for is single sign-on, and that is how I see MSS. I never log
on specifically to MSS, I only log on Windows, and if the users are
correctly defined in MSS, I just "get in".

I can also imagine that my system has to have it's own user registry to
cope with it's internal permissions, what functions a user may or may not
use. If not, I'm curious of how such a solution might work.
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com>
wrote in news:#k**************@TK2MSFTNGP12.phx.gbl:
Hello Peter,

Not sure why do you've given SourceSafe as the example... SourceSafe
databases maintain its own lists of users.
Anyway, I think you should take a look at the WindowsIdentity and
WindowsPrincipal classes:

using System.Security.Principal;

WindowsIdentity curUser = WindowsIdentity.GetCurrent();
bool allow = curUser.IsAuthenticated;

WindowsPrincipal membership = new WindowsPrincipal(curUser);
bool isAdmin = membership.IsInRole("BUILTIN\\Administrators");


Nov 16 '05 #3
> I gave MSS as an example of the workflow, not an example of the technical
aspects. During my research I've learned that the term for the function
I'm looking for is single sign-on, and that is how I see MSS. I never log
on specifically to MSS, I only log on Windows, and if the users are
correctly defined in MSS, I just "get in".
It's probably because the names of the VSS users match the Windows
logon names. AFAIK your logon name is the first thing the VSS client
attempts to log in to a VSS database, so if the two match, you
"just get in".

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Peter Tragardh" <pe************@hotmail.com> wrote in message
news:Xn**********************************@207.46.2 48.16... I gave MSS as an example of the workflow, not an example of the technical
aspects. During my research I've learned that the term for the function
I'm looking for is single sign-on, and that is how I see MSS. I never log
on specifically to MSS, I only log on Windows, and if the users are
correctly defined in MSS, I just "get in".

I can also imagine that my system has to have it's own user registry to
cope with it's internal permissions, what functions a user may or may not
use. If not, I'm curious of how such a solution might work.
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com>
wrote in news:#k**************@TK2MSFTNGP12.phx.gbl:
Hello Peter,

Not sure why do you've given SourceSafe as the example... SourceSafe
databases maintain its own lists of users.
Anyway, I think you should take a look at the WindowsIdentity and
WindowsPrincipal classes:

using System.Security.Principal;

WindowsIdentity curUser = WindowsIdentity.GetCurrent();
bool allow = curUser.IsAuthenticated;

WindowsPrincipal membership = new WindowsPrincipal(curUser);
bool isAdmin = membership.IsInRole("BUILTIN\\Administrators");


Nov 16 '05 #4
Anyway, the examples you gave was what I was looking for.
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
8
by: Bob Everland | last post by:
I have an application that is ISAPI and the only way to secure it is through NT permissions. I need to have a way to login to windows authentication so that when I get to the ISAPI application no...
9
by: Tom B | last post by:
In my web.config file I've specified Windows for the authentication, in IIS I've set it to Integrated Authentication. But my SQL connection is still showing Anonymous. Is there somewhere else I...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
4
by: Andrew | last post by:
Hey all, I would like to preface my question by stating I am still learning ASP.net and while I am confident in the basics and foundation, the more advanced stuff is still a challenge. Ok....
6
by: Manny Chohan | last post by:
I am using forms authetication in the web config. i can validate a user against a database and click on images which makes hidden panels visible.However when i click on the link inside a panel...
5
by: Maziar Aflatoun | last post by:
Hi everyone, I have a login .aspx page that I like to forward my users to. However, can't do it using <authorization> ..... </authorization> because I need anonymous users to use it without...
0
by: Albertas | last post by:
What I'm doing wrong that I can't make my authentication to work. Here is the situation: I'm hosting a Web Service from a Windows forms application, using .NET Framework 3.0 WCF. And I want to...
2
by: Frank Swarbrick | last post by:
I am trying to understand "client authentication" works. My environment is DB2/UDB LUW 8.2 on zSeries SLES9 as the database server and DB2 for VSE 7.4 as the client. We currently have DB2/LUW set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.