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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:39:33+00:00 2026-06-09T02:39:33+00:00

looking for some info on where to change this… I have a .net 4

  • 0

looking for some info on where to change this…
I have a .net 4 web app sitting on one box and its SQL db sitting on another.
The users windows AD login is picked up and used throughout the app with

System.Security.Principal.WindowsIdentity.GetCurrent().Name;

If I run the app locally, I get the correct login eg “MyDomain\MyLogin”,
If I hit the app on its host box the login picked up becomes “IIS APPPOOL\ASB”,
ASB being the name of the AppPool used (and the name of the app).
I really need to return “MyDomain\MyLogin”, so should I use a different approach?

thanks

  • 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-09T02:39:34+00:00Added an answer on June 9, 2026 at 2:39 am

    If you want the web application to run the security context of the connected user, then you need to add the following to the <system.web> section of your web.config file:

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

    The first line tells IIS how to authenticate users and the second tells ASP.Net that you want to run the web application in the security context of the connected user as opposed to the security context of the IIS application pool.

    Note that you can also use the identity element to specify that all requests are to be run in the context of a specific user.

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

Sidebar

Related Questions

I'm currently building a web app that will take some info from a database
I have a plain text file looking like this: some text containing line breaks
Looking for some guidance on a WCF service I’m prototyping. I have a WCF
looking for some help with images referenced within the stylesheet. I have no problems
In my app, i have an import option, to read info from a .csv
I am developing a web app that accesses some external JSON data. I'm currently
I have a list, consisting of links looking like this: <a href=index.php?p=page_1>Page 1</a> <a
I have a C#/.Net app that is essentially a thick client data collection app.
I seem to have an issue. I wanted to add some additional config info
I`m looking for WYSYWIG JavaScript HTML editor for my app. I`ve already tried some

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.