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

  • Home
  • SEARCH
  • 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 6726361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:55:07+00:00 2026-05-26T09:55:07+00:00

When a user tries to connect to a SQL Server Database through Windows Authentication

  • 0

When a user tries to connect to a SQL Server Database through Windows Authentication in my ASP MVC 3 app, with the following connection string:

<add name="btnintranetContext" connectionString="Data Source=BTN-SERVER;Initial Catalog=Intranet;Integrated Security=SSPI;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>

They get the following error:

Cannot open database "Intranet" requested by the login. The login failed.
Login failed for user 'User'. 

I understand what this means, it means that I haven’t given that user access to the database, but I want user’s to be able to access the database without having to give them all access to it. I’ve tried specifying a specific Database user in my connection string like so:

<add name="btnintranetContext" connectionString="Data Source=BTN-SERVER;Initial Catalog=Intranet;User Id=mylogin;Password=mypassword;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>

But I get a new error:

Login failed for user 'mylogin'.
The provider did not return a ProviderManifestToken string.

But I know for definite that mylogin has access to the database because when I try to access the database with the windows authentication connection string, it works. But for security reasons, I don’t want to give everyone that uses my app access to the database, thats why I tried specifying a user in the connection string.

Additional info from my web.config file:

<authentication mode="Windows" />
<identity impersonate="true" />
<trust level="Full"/>
<authorization>
      <deny users="?" />
      <allow users="*" />
</authorization>
  • 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-26T09:55:07+00:00Added an answer on May 26, 2026 at 9:55 am

    Set if it’s at all possible, and than give the user running the IIS website(usually NETWORK SERVICE be default) access to the database.
    If setting impersonate to false is not possible for some reason, you should use SQL authentication instead.

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

Sidebar

Related Questions

I have the following connection string: <add name=DataContext connectionString=DATA SOURCE=Server; PASSWORD=123;USER ID=SYSTEM providerName=Oracle.DataAccess.Client/> My
I need to connect a SQL Server 2008 database to an asp.net website project.
I'm trying to connect to SQL Server using Windows authentication. The code works fine
I am trying to connect to SQL server through an asp.net page and I
I'm trying to create a user in a SQL Server database with SQL authentication.
I am attempting to connect to SQL Server running on Windows XP system from
I have SQL Server 2008 to which I can connect using domain user credentials.
I have an ASP.NET web app where I use an ado sql connection to
I have a SQL Server 2005 named instance using Windows Authentication with domain groups
I have programmed a Windows Service in C# which should connect to an SQL-Server

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.