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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:13:31+00:00 2026-05-28T00:13:31+00:00

I have a C# ASPX website stored on one server that calls numerous results

  • 0

I have a C# ASPX website stored on one server that calls numerous results from an SQL server, both in the same domain. In my SQL database there are two users with the same permissions:

  1. admin
  2. NTADMIN\Me

My website is stored in the IIS directory on a local server. In my web.config file I have the identity impersonation and connection strings as follows:

<identity impersonate="true" userName="admin" password="admin" />

<add name="ConnectionString" connectionString="Data Source='server';Initial Catalog='database';Integrated Security=SSPI;" providerName="System.Data.SqlClient" />

Why does this work when I hardcode my ‘NTADMIN\me’ credentials but not the admin ‘credentials’ of the SQL database? Does the ‘admin’ user need to have domain credentials too? I didn’t think this was necessary if I can log into the database using them.

The error I’m receiving is as follows (the uid+pwd work fine logging into the db):

Could not create Windows user token from the credentials specified in the config file. Error from the operating system ‘Logon failure: unknown user name or bad password.

  • 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-28T00:13:32+00:00Added an answer on May 28, 2026 at 12:13 am

    You cannot impersonate a SQL user in this case. You have two user types here, a sql user AND a windows user. The identity impersonate tag there will only work for a windows user account.

    Windows tries to log this user in and it knows nothing about it, hence the failed password.

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

Sidebar

Related Questions

This is what I have in the aspx page: <head runat=server> <title>Website - <asp:ContentPlaceHolder
I have a class that implements IHttpModule in a separate assembly from a website.
I have a Django website that basically just displays a bunch of items from
I have 3 home PCs that have 2008 SQL Server Express instances installed on
I have a website hosted on Windows Azure Cloud. In one of the aspx
I have around 40 aspx pages in my website. I want to use a
I have inherited an asp.net website to maintain when looking at the aspx page,
I have an ASPX page (On server A) which is invoked using NTLM credentials.
I have one aspx page with some controls. Also i have one DIV which
i have a website that will have customized designs, depending on what store was

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.