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 674321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:41:36+00:00 2026-05-14T00:41:36+00:00

The basic setup is classic – you’re creating a Windows Forms application that connects

  • 0

The basic setup is classic – you’re creating a Windows Forms application that connects to a DB and does all kinds of enterprise-y stuff. Naturally, such an application will have many users with different access rights in the DB, and each with their own login name and password.

So how do you implement this? One way is to create a DB login for every application user, but that’s a pretty serious thing to do, which even requires admin rights on the DB server, etc. If the DB server hosts several applications, the admins are quite likely not to be happy with this.

In the web world typically one creates his own “Users” table which contains all the necessary info, and uses one fixed DB login for all interaction. That is all nice for a web app, but a windows forms can’t hide this master login information, negating security altogether. (It can try to hide, but all such attempts are easily broken with a bit of effort).

So… is there some middle way? Perhaps logging in with a fixed login, and then elevating priviledges from a special stored procedure which checks the username and password?

Added: OK, so integrated authentication and windows groups seem to be a fair choice in most situations, so I accepted the relevant answer. Still, if anyone can come up with a non-integrated authentication solution, they’ll get an upvote from me.

  • 1 1 Answer
  • 0 Views
  • 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-14T00:41:37+00:00Added an answer on May 14, 2026 at 12:41 am

    For WinForms use Windows groups. No passwords are needed because the credentials are inferred from the Windows login using your application.

    This is best practice

    Basically:

    • The user belongs to a group (assumes single domain)
    • Group is a login in the SQL Instance
    • SQL login maps to a database user
    • DB User belongs to a DB role
    • Role has object permissions

    It’s worth reading up first before having someone try to capture all the information here

    Edit:

    If you have a workgroup, you can still do it by setting up sqlbox\bob, sqlbox\hans etc in a sqlbox local group.

    When someone tries to connect (say bob on his PC) windows will ask them for their details. As long as bob knows his SQLbox account detailsm he can connect.

    But then, I’ve not tried this in a workgroup setting…

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

Sidebar

Related Questions

I've written some basic setup code for an OpenGL application: #include <Windows.h> #include <gl/gl.h>
I have a CI application that uses .htaccess for URL routing. My basic setup
The basic setup is that I have a web application that calls SQL Reporting
I assume that the basic setup for ASP.net web development today is: Windows Vista
I have to setup a basic JAVA application including a GUI based on swing.
I have a basic nServicebus 3.2.0 setup with a web application endpoint and a
I have assumed that if I have the basic setup of... <head> <meta name=viewport
Hopefully I'll get some help here. Basic setup is this: My application swaps out
I installed (basic setup) of RTC 3.0.1 on Windows 2008 server. The setup passed
Basic setup is a series of divs that have additional info that slides down

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.