473,748 Members | 7,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1908
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
WindowsPrincipa l classes:

using System.Security .Principal;

WindowsIdentity curUser = WindowsIdentity .GetCurrent();
bool allow = curUser.IsAuthe nticated;

WindowsPrincipa l membership = new WindowsPrincipa l(curUser);
bool isAdmin = membership.IsIn Role("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.248.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.c om>
wrote in news:#k******** ******@TK2MSFTN GP12.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
WindowsPrincipa l classes:

using System.Security .Principal;

WindowsIdentity curUser = WindowsIdentity .GetCurrent();
bool allow = curUser.IsAuthe nticated;

WindowsPrincipa l membership = new WindowsPrincipa l(curUser);
bool isAdmin = membership.IsIn Role("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.248.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.c om>
wrote in news:#k******** ******@TK2MSFTN GP12.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
WindowsPrincipa l classes:

using System.Security .Principal;

WindowsIdentity curUser = WindowsIdentity .GetCurrent();
bool allow = curUser.IsAuthe nticated;

WindowsPrincipa l membership = new WindowsPrincipa l(curUser);
bool isAdmin = membership.IsIn Role("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
9289
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. # No warranty express or implied for the accuracy, fitness to purpose
8
3707
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 boxes come up. I want an ASP page to sit between the user and the ISAPI application. The rest of my application is using authentication that is database driven and wouldn't want the users to know the userid and password. Is this possible? If so...
9
2509
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 need to check? Thanks Win 2003, SQL Server 2000
3
4870
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 protected by forms authentication. When I create forms authentication at root level it works but when I move my code up to the subfolder I get this error: Server Error in '/TestProjects/FormsAuthenticationTestingArea' Application.
0
4241
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 Applications and owner of Access Microsystems. Doug can be reached at doug@accessmicrosystems.com. --------------------------------------------------------------------------------
4
6805
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
517
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 which should take user to another pages, it defaults them back to the login page prompting them to enter username and password. Could someone please shed some light on this on how i can fix this issue? Thanks Manny
5
272
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 any authentication. We have this in our Web.config file <authentication mode="Forms">
0
1524
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 implement user authentication. Here is my Web Service class called "methods": public class Authentication : SoapHeader { public String user; public String pwd;
2
7518
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 up as follows: Client Userid-Password Plugin (CLNT_PW_PLUGIN) = Client Kerberos Plugin (CLNT_KRB_PLUGIN) = Group Plugin (GROUP_PLUGIN) = GSS Plugin for Local Authorization ...
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.