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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:45:45+00:00 2026-06-13T04:45:45+00:00

My problem is the following. I have a website that I’m creating and wanting

  • 0

My problem is the following. I have a website that I’m creating and wanting to use Forms Authentication on it. Everything is fine and perfect except now that I have added the possibility of saving users to a database. I have added the database to my AppData folder on visual studio (created one). But everytime a user tries to create a new account (on my website) I get an error that looks like this (in debugging):

Login failed for user ‘DOMAIN\username’

My connection string is the following:

<connectionStrings>
    <add name="SecurityConnectionString" 
         connectionString="Data Source=(computername)\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Security.mdf;Integrated Security=True;User Instance=true" 
         providerName="System.Data.SqlClient" />
</connectionStrings>

The weird thing is that I can connect to SQL Management Studio with my windows login no problems. I have tried creating a new user (in SQL) and using those credentials but still no luck (get errors with regards to user not being able to create a new db even though I have given the user db_owner rights). Any insight would be appreciated. Thanks in advance.

Specifically this is the error I get

[SqlException (0x80131904): Login failed for user 'DOMAIN\username'.]

UPDATE:

I found something out. Whenever I change “Windows Authentication” to “SQL Server Authentication” on SQL Server Management Studio, I can’t login, even with the right password and username. This might (most likely) be the source of the problem I believe.

  • 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-06-13T04:45:47+00:00Added an answer on June 13, 2026 at 4:45 am

    I found the solution. Just needed to create a new user (under SQL Server Authentication) and then add admin rights to that user using my Windows Authentication credentials through SQL, meaning, I created an user and then gave that user admin rights. This seems simple enough, the problem I was encountering was the following:

    To my understanding, if you have access to a SQL database (whatever authentication mode you use) and you have admin rights on that database, you can do whatever you wish to it. However, it seems that is not the case as my ‘DOMAIN\username’ credentials were not authenticated when using SQL Server Authentication, meaning, I did not have admin rights.

    Anyways, after creating the new user, and modifying the connection string, I managed to be able to write/read/anything to the database.

    I appreciate everybody’s help on the issue. Thank you.

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

Sidebar

Related Questions

I am creating a website and am facing the following problem. I have 2
So I have the following website: http://www.itmustbecollege.com/ and it has a problem SOMEWHERE that
I have the following problem: I've got a website that can't have dependencies to
Hi I have the following problem, I want to laod a website with php.
I have the following problem. I am making this website you can see in
Folks, i have the following problem. My website uses an iframe to select an
I have following problem: Some links that show up in the Menu (the children
I have news items on my website that get rewritten using the following rule:
I have the following problem: On my website I am using colorbox to display
I have the following problem: My application needs to inform a website of a

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.