472,780 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

authorization for c# winforms applications

I have been doing some initial research for authentication and authorization
options for our next round of apps. I found an article in MSDN magazine
that involved using MS Authorization Manager AKA: AzMan, I'm still looking
into azman. I have also done authentication and authorization with asp.net
in the past, I don't recall the classes that I used, but I think they were
specific to asp.net. I would like to use a SqlServer back end for our user
data. We don't need any AD integration. We basically just need a simple
user/roles system.

I'm curious how some of you have implemented this in the past. I have a
tendency to "roll my own" solution too often and would be interested in
utilizing pre existing classes if they fit our needs.

If you have a basic solution that you have used in the past that worked
well, please share. I'm trying to get all my options out on the table so
that I can make the best decision.

Thanks for reading,
Steve
Feb 8 '06 #1
4 9103
Hi Steve,
if I was you I would look into the Principal and Identity concept inside
the System.Security.Principal namespace. Basically an identity says who this
person is and if they have been authenticated and a principal links an
identity to a collection of roles. There is an IIdentity and IPrincipal
interface plus a couple of concrete implementations of these interfaces that
are in the framework like WindowsPrincipal or a GenericPrincipal.

You can then set the Principal information in the current thread, using the:
System.Threading.Thread.CurrentPrincipal property. This way you can easily
pass round the users identity and role information throughout your
application.

Hope that gives you a starting point.

Mark Dawson
http://www.markdawson.org

"sklett" wrote:
I have been doing some initial research for authentication and authorization
options for our next round of apps. I found an article in MSDN magazine
that involved using MS Authorization Manager AKA: AzMan, I'm still looking
into azman. I have also done authentication and authorization with asp.net
in the past, I don't recall the classes that I used, but I think they were
specific to asp.net. I would like to use a SqlServer back end for our user
data. We don't need any AD integration. We basically just need a simple
user/roles system.

I'm curious how some of you have implemented this in the past. I have a
tendency to "roll my own" solution too often and would be interested in
utilizing pre existing classes if they fit our needs.

If you have a basic solution that you have used in the past that worked
well, please share. I'm trying to get all my options out on the table so
that I can make the best decision.

Thanks for reading,
Steve

Feb 8 '06 #2
After further review, AzMan isn't an option as not all of the users of our
system will be in our active directory and it appears that AzMan doesn't
support localized, non windows user accounts. In other words, there is no
"Create new user" option in AzMan.

This is too bad, I really liked the nested approach they use, very
efficient.
"sklett" <as**@fkd.com> wrote in message
news:eC**************@TK2MSFTNGP09.phx.gbl...
I have been doing some initial research for authentication and
authorization options for our next round of apps. I found an article in
MSDN magazine that involved using MS Authorization Manager AKA: AzMan, I'm
still looking into azman. I have also done authentication and
authorization with asp.net in the past, I don't recall the classes that I
used, but I think they were specific to asp.net. I would like to use a
SqlServer back end for our user data. We don't need any AD integration.
We basically just need a simple user/roles system.

I'm curious how some of you have implemented this in the past. I have a
tendency to "roll my own" solution too often and would be interested in
utilizing pre existing classes if they fit our needs.

If you have a basic solution that you have used in the past that worked
well, please share. I'm trying to get all my options out on the table so
that I can make the best decision.

Thanks for reading,
Steve

Feb 8 '06 #3
Hi Steve,
if I was you I would look into the Principal and Identity concept inside
the System.Security.Principal namespace. Basically an identity says who this
person is and if they have been authenticated and a principal links an
identity to a collection of roles. There is an IIdentity and IPrincipal
interface plus a couple of concrete implementations of these interfaces that
are in the framework like WindowsPrincipal or a GenericPrincipal.

You can then set the Principal information in the current thread, using the:
System.Threading.Thread.CurrentPrincipal property. This way you can easily
pass round the users identity and role information throughout your
application.

Hope that gives you a starting point.

Mark Dawson
http://www.markdawson.org

"sklett" wrote:
I have been doing some initial research for authentication and authorization
options for our next round of apps. I found an article in MSDN magazine
that involved using MS Authorization Manager AKA: AzMan, I'm still looking
into azman. I have also done authentication and authorization with asp.net
in the past, I don't recall the classes that I used, but I think they were
specific to asp.net. I would like to use a SqlServer back end for our user
data. We don't need any AD integration. We basically just need a simple
user/roles system.

I'm curious how some of you have implemented this in the past. I have a
tendency to "roll my own" solution too often and would be interested in
utilizing pre existing classes if they fit our needs.

If you have a basic solution that you have used in the past that worked
well, please share. I'm trying to get all my options out on the table so
that I can make the best decision.

Thanks for reading,
Steve

Feb 8 '06 #4
Hi Mark,

Thank you for your post! I believe these are the two interfaces that I used
when I developed the asp.net application. It sounds like from what you have
said that I'm not limited to using them with just the WebForms side of
things. I will find some good examples and tutorials and give this a real
look. Thank you again for your post.

Have a good night,
Steve
"Mark R. Dawson" <Ma*********@discussions.microsoft.com> wrote in message
news:68**********************************@microsof t.com...
Hi Steve,
if I was you I would look into the Principal and Identity concept inside
the System.Security.Principal namespace. Basically an identity says who
this
person is and if they have been authenticated and a principal links an
identity to a collection of roles. There is an IIdentity and IPrincipal
interface plus a couple of concrete implementations of these interfaces
that
are in the framework like WindowsPrincipal or a GenericPrincipal.

You can then set the Principal information in the current thread, using
the:
System.Threading.Thread.CurrentPrincipal property. This way you can
easily
pass round the users identity and role information throughout your
application.

Hope that gives you a starting point.

Mark Dawson
http://www.markdawson.org

"sklett" wrote:
I have been doing some initial research for authentication and
authorization
options for our next round of apps. I found an article in MSDN magazine
that involved using MS Authorization Manager AKA: AzMan, I'm still
looking
into azman. I have also done authentication and authorization with
asp.net
in the past, I don't recall the classes that I used, but I think they
were
specific to asp.net. I would like to use a SqlServer back end for our
user
data. We don't need any AD integration. We basically just need a simple
user/roles system.

I'm curious how some of you have implemented this in the past. I have a
tendency to "roll my own" solution too often and would be interested in
utilizing pre existing classes if they fit our needs.

If you have a basic solution that you have used in the past that worked
well, please share. I'm trying to get all my options out on the table so
that I can make the best decision.

Thanks for reading,
Steve

Feb 8 '06 #5

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

Similar topics

2
by: Empire City | last post by:
I saw the following requirement somewhere: "....using WinForms and the screens should be described in XML. The XML is to prescribe both the layout as well as the connectivity to the underlying...
0
by: Shamil Salakhetdinov | last post by:
Hi All, Have anybody seen somewhere techniques like the one described here: Automating Windows Applications http://www.thecodeproject.com/com/automatingwindowsapps.asp but for managed...
4
by: 3Cooks | last post by:
I have a windows application written in Visual Basic 6.0 that is going to be redeveloped in dotNET. We are trying to decide if we should deploy using Webforms or Winforms and I need advice from...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
1
by: gilly3 | last post by:
I'd like to use a master page for (nearly) every page in my ASP.NET 2.0 website. I also have some webpages that I'd like to protect by using forms authorization. I have a page that requires...
5
by: brian.wilson4 | last post by:
Our group is currently comparing winforms vs webforms.....app is Corp LAN based - we have control of desktops.....Below is pros and cons list we have come up with - if anything strikes you as...
10
by: Jules Winfield | last post by:
Guys, I've been designing applications for the financial services industry using MSFT technologies for many years (Win32 API, MFC, and now .NET WinForms). All applications are Internet-based,...
1
by: twdinc | last post by:
I am primarily a web developer but I am starting a WinForms applications. In the past, I have seen sample applications, starterkits, and/or Visual Studio Templates that are basically empty Visual...
23
by: raylopez99 | last post by:
Here I am learning WinForms and two months into it I learn there's a WPF API that is coming out. Is this WPF out yet, and is it a threat to WinForms, in the sense that all the library routines I...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.