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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:50:42+00:00 2026-05-11T13:50:42+00:00

I know this sounds backwards but I would like to be able to determine

  • 0

I know this sounds backwards but I would like to be able to determine what authentication mode a SQL server is in prior to connecting with credentials. Is this possible?

In case you’re interested, I’ll briefly explain why…

The majority of the users of our product don’t know, understand or even care about the database underlying their business application. Traditionally we have simply installed SQL Server 2005 Express silently as part of the installation, with a SQL user and password embedded in the application. For the majority of ‘Ma and Pa’ companies we’ve sold to over the past 10 years, this has been enough.

As security concerns are becoming more prominent and our product is starting to reach some larger scale users (with IT consultants or even staff of their own that do have a clue about security) some with their own pre-existing (pre ‘our product’ being installed) SQL servers we find we are needing to fit into existing environements more flexibly.

I don’t have a problem with that, but I do not want to force decisions about SQL server authentication methods, user names and passwords etc, etc, onto our ‘lowest common denominator’ user, at installation.

If that’s all to hard, we lose them before we even get started.

So, I would like for our application to be able to determine quickly and easily what mode the server is running in, and build its connection string appropriately.

Currently we are simply using trial and error – try to connect with Windows Authentication, connect? = good, fail? = try with SQL and the known user name/password, connect? = good, fail? now prompt for credentials because in this scenario they must have changed stuff and therefore have an idea about what they are doing.

Is ‘trial and error’ the only way or is there a way to check authentication mode before connecting with credentials? (Using c# and sql2005 for what it’s worth)

  • 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. 2026-05-11T13:50:42+00:00Added an answer on May 11, 2026 at 1:50 pm

    For what it’s worth, I’m not sure checking the authentication mode prior to attempting a connection is going to help.

    If the authentication mode is Windows Auth, you won’t know until you try to connect whether the identity of the current user has login rights.

    If the authentication mode is Mixed Auth, there’s no guarantee that the account & password you specify is going to work either – so I don’t think you have an alternative but to use trial and error.

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

Sidebar

Related Questions

I know this sounds like a homework assignment, but it isn't. Lately I've been
I know this sounds like a dumb question but I need to ask this.
I know this sounds like something I can google, but the truth is that
I know this sounds like an easy question but for some reason I just
I know this sounds like a stupid question, but I really don't see the
I know this sounds like a broad question but I can narrow it down
I know this sounds like a really obvious question, but it's proving harder to
I know this sounds like a simple question, but I just wasted the last
I know this sounds like a subjective answer, but I will try to make
I know this sounds like a dumb question, but it's to settle an argument

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.