Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 260657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:21:59+00:00 2026-05-11T22:21:59+00:00

Coming from ASP.NET into WindowsForms app development I was expecting to see the similar

  • 0

Coming from ASP.NET into WindowsForms app development I was expecting to see the similar controls to work with. To my surprise, I didn’t see any security controls (login, user management, etc.)

Am I missing something, or I’d have to implement my own security for the application (role based security, user management, etc.)?

The application is for internal use (10 -20 users) but security is very important due to sensitive data. (MSSQL Server 2005 is in the back end, .NET 3.5)

Any info would be appreciated.

EDIT:

i guess my question is "Is there an analog of ASP.NET’s Membership provider in WinForms?"

EDIT2:

after some Googling i found this article, I’ll give that a try, any other suggestions are appreciated.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:21:59+00:00Added an answer on May 11, 2026 at 10:21 pm

    Most times a Windows Forms application is used in an internal network with Windows Domain accounts.
    In this case you should use “Integrated security” to connect to the database and test if user is authenticated with

     WindowsIdentity winIdentCurrent = WindowsIdentity.GetCurrent();
     if (winIdentCurrent != null)
     {
          Console.Write("WindowsIdentity.GetCurrent(): ");
          Console.WriteLine(winIdentCurrent.Name);
          Console.Write("WindowsIdentity.GetCurrent() IsAuthenticated: ");
          Console.WriteLine(winIdentCurrent.IsAuthenticated);
          // Everything is fine, trust Windows API :-)
     }
    

    otherwise
    authenticate the user/pass via your own method (db call)

    1. use a generic connection string
      (not recommended)
    2. set the user/pass of the connection string to your
      authenticated user/pass

    AND set the Thread.CurrentPrincipal to your own Principal object

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently started development in ASP.NET, and coming from a PHP background I sprinkle
I'm diving into ASP.NET MVC and I'm coming from a Ruby on Rails background.
I'm jumping into updating an ASP(.NET) website coming from a PHP background and am
I have wanted to try GAE since launch, but coming from ASP .NET and
I'm trying to understand ColdFusion, as I am coming from ASP.NET. I've put together
Given that: The asset pipeline is fairly complex (coming from ASP.NET MVC, this is
Coming from an Classic ASP background I'm pretty cautious about placing objects into Session.
The beauty of MVC is the separation of concerns, especially coming from the Asp.net
I have a webforms app that uses a few ASP.NET AJAX Timer controls (i.e.
Coming from ASP.NET, this WPF stuff is just confusing. All I want to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.