Enable windows logon prompt in asp.net application - asp.net

I have a asp.net application which uses windows authentication. The user are able to access the site without problem as it a intranet application within the organization. But now i need the user to prompt window logon after filling in the details it should authenticate in IIS. How can i achieve this.

Related

Prompt for windows login credentials when accessing IIS web application

When i try to access an ASP.NET MVC web application hosted in IIS 6.0, i'm getting a windows popup that wants me to enter my windows login name and password. After entering the credentials, i can then reach the login page.
See in the below screenshot what fiddler captures when the windows login prompt pops up. What setting do i need in order to avoid this windows prompt?
Two options.
1) Disable Windows authentication. Enable Anonymous or Forms.
2) Edit your IE settings. Add the site into trusted sites and go to custom level, simply scroll to the bottom and "login with current username and password" button ticked. This will auto negotiate the windows login you are using into IIS as a pass thru.

IIS - Custom Application Pool identity not being used

I have an ASP.NET web application that uses an Application Pool with a custom identity set to connect to DB via Trusted Authentication.
I have this working correctly on a dozen servers, yet I am having an issue with one: IIS is not using the custom identity and is instead attempting to impersonate the user when initiating the DB connection.
I verified I have the app pool configured to use the custom account and my web.config has <identity impersonate="false"/>. In fact I'm using an exact copy of the code and web.config from another properly working box.
I do have Windows Authentication enabled for the app to get the user login, but not for impersonation, and this is working correctly on 12 of 13 servers. If I disable Windows Authentication on the impacted box, I get Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON when accessing the site.
I tried recreating the application pool and the the IIS Application to no avail.
Anyone seen this behavior before? I'm running out of ideas. Thanks!
ASP.NET MVC4
IIS 7.5
Server 2008 R2 64bit

IIS 7 asp.net application - pass through windows authentication from client to Sharepoint web service (not app pool account)

I'm a little stuck configuring IIS to enable full "pass through" authentication on a web app that communicates with Sharepoint 2010 web services in the code behind. This all runs on a local domain.
I've set the site up as "Windows" authentication in the web.config:
The "asp:LoginName" control displays my domain\user id correctly when the app is deployed to the site.
Everything works fine, however all the work done in the back end connecting to Sharepoint runs under the AppPool account, not the user logged in running the site.
For audit reasons, I want to be able to run everythign as the user that is running the site, not the app pool account.
Can I configure the App Pool to use (or impersonate) the client user account? I thought this would be straight forward, but I'm struggling to see what I have to do to enable this in IIS.
Impersonation isn't set up in IIS; rather, it's configured through the ASP.NET application itself in web.config.
See http://support.microsoft.com/kb/306158 for more details, but in brief as you find that the ASP.NET LoginName control sees your credentials your user principal is set correctly. So, just including
<identity impersonate="true" />
in your web.config file should work fine.

Run the ASP .NET web application under a different user than the current user

IIS is utilizing the current logged-user's credentials to access an ASP.NET application. Is it possible to create a login page on the application and pass another users credentials, so that particular web app is run under a different user?
Disable impersonation, should you have enabled it (most likely not) and set the Authentication in IIS to Anonymous with the Account you wish to run under:
http://support.microsoft.com/kb/324274

How do I force windows authentication with local asp.net development server?

I'm developing an ASP.NET application which needs Windows Authentication. I have the web.config set up to deny anonymous users and use Windows mode for authentication, but my local development version still lets me pass right through to the site. In order to test different user set-ups, I need to force authorization so I can change users.
How do I set up my system (config files, VS2005 settings, IIS, etc?) to force the authorization window to popup on the site when I'm running on local asp.net development server? In other words, how do I get the authentication popup when running the site in Debug mode?
You will also need to configure IIS and have your application point to IIS instead of the local web server
To configure Windows authentication
Start Internet Information Services (IIS).
Right-click your application's virtual directory, and then click Properties.
Click the Directory Security tab.
Under Anonymous access and authentication control, click Edit.
Make sure the Anonymous access check box is not selected and that Integrated Windows > authentication is the only selected check box.
http://msdn.microsoft.com/en-us/library/ms998358.aspx
To configure your application to point to IIS
Right click on your web project, and then click Properties
Click the Web tab
Click the "Use Local IIS Web Server" radio button

Resources