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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:08:25+00:00 2026-05-19T09:08:25+00:00

What I want to do is: Allow anonymous users to access my ASP .NET

  • 0

What I want to do is:

  • Allow anonymous users to access my ASP .NET site.
  • Use Windows Authentication for the site to access Sql Server. It will log in to Sql Server with a domain account set aside especially for the site (and preferably do everything under the same account).

Every article on the Web tells you to do this:

<authentication mode="Windows"/>
<identity impersonate="true"/>

in Web.config. However, I gather that this is only if you want users to log in with Windows Authentication. It has nothing to do with the server logging in to SQL Server (except that the combination of the above 2 implies that users’ authentication will also be used to connect to the database). Is this correct? Given that my Windows account has access to files on the server and the database which the site is connecting to, this seems hard to test….

It seems that if I:

  • set the App Pool Identity to the domain account
  • enable Anonymous Access on the site using the domain account
  • use a connect string with Windows Authentication

then the site will connect to SQL Server via Windows Authentication. Also, it will use the domain account as long as impersonation is off. Is this correct?

  • 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-19T09:08:25+00:00Added an answer on May 19, 2026 at 9:08 am

    in Web.config. However, I gather that
    this is only if you want users to log
    in with Windows Authentication. It has
    nothing to do with the server logging
    in to SQL Server

    This is partially true. The impersonated account will be used to logon SQL server if delegation is setup properly. You didn’t see this because in most of the environment, delegation needs to be explicitly setup. Delegation is a more powerful form of impersonation and makes it possible for the server process (in your case, IIS process) to access remote resources (in your case, SQL server) while acting as the client. For more information, you can google ASP.NET Delegation. I said it’s partially true because in some simple environment, you don’t even need any special configuration. The delegation is just working. For example, if you have SQL server running on the same machine as the IIS server. Another case is that you have your IIS server running on an Active Directory domain controller (very rare). In these two cases or on a machine with delegation configured properly, your above statements will be wrong.

    It seems that if I:

    • set the App Pool Identity to the
      domain account
    • enable Anonymous
      Access on the site using the domain
      account
    • use a connect string with
      Windows Authentication

    then the site
    will connect to SQL Server via Windows
    Authentication. Also, it will use the
    domain account as long as
    impersonation is off. Is this correct?

    Yes, this is correct.

    Given that my Windows account has
    access to files on the server and the
    database which the site is connecting
    to, this seems hard to test….

    It’s easy to test if you have two domain accounts (or one domain account and one local account). Set the App Pool identity to use your DomainAccount1. Grant only DomainAccount1 to have permission to access your database. Access your web app on another machine using another accound (either domain account or local account). Test if the web app can properly access your database.

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

Sidebar

Related Questions

I want allow the user to customize their web pages on my ASP.NET MVC
I want to allow users to upload avatar-type images in a variety of formats
I want to allow users to paste <embed> and <object> HTML fragments (video players)
I have a REST data service where I want to allow the users to
We have a high security application and we want to allow users to enter
I use ASP .Net 4 and I have a project using the form web
I'm developing a Facebook app, and i only want to allow access to certain
We have a chat application which works on ASP.Net web applications. We want to
I want to allow an Excel report to be viewed embedded in a WebPage...
We want to allow normal href links to other webpages, but we don't want

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.