ASP.NET 3.5 Permissions on IIS 6 - iis

I have an asp.net page which changes passwords in the OU. Where do I set the user which actually runs my code?
In the virtual directory security settings, is it the application pool user? Or is it in Web.config? Which one of the configurations actually configures the user that runs the asp.net code?

The identity of the user under which a web application runs is defined by the application pool which the web application uses. All of this can be seen and set in Internet Information Server (IIS) Manager.

As far as I know the Identitiy with which a aps.net application is run is set in the properties for the web application.

Related

IIS 10.0 AppPool crashing

After a company forced Windows 10 update today, the Application Pool required by a local web application keeps stopping/crashing displaying the message
Service Unavailable
HTTP Error 503. The service is unavailable.
I have checked the the below similar posts and followed the solutions provided with no luck.
#1 - https://stackoverflow.com/questions/47338226/iis-10-0-apppool-crashing-causing-503-error
For hosting .Net Core applications in IIS, .Net CLR Version of
application pool should be No Managed Code as shown in below
screenshot.
#2 - https://stackoverflow.com/questions/50244861/iis-10-app-pool-keeps-stopping-due-to-aspnetcore-dll-failed-to-load
Go to the drive your IIS is installed on, eg. C:\inetpub\temp\appPools\
Delete the directory (or virtual directory) with the same name as your app pool.
Recycle/Start your app pool again.
I have also followed the Microsoft instructions. Made sure to first follow the steps in "Turn Windows features on/off) and then installing the ASP.NET Core hosting bundle as instructed.
#3 - https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1&tabs=aspnetcore2x
I'm not having any luck.
Here's my setup App Pool
Here's my setup Site
I've done everything I know. Does anyone have this same experience and can share a solution?
As always, a big thank you to the experts out there!
UPDATE:
I created a new AppPool with Identity "ApplicationPoolIdentity" setting. The page will run however I need to connect to a SQL Server instance with my own credentials because we use Windows authentication on most of the pages. When I create a new AppPool with my credentials it will not stay running.

web configuration changing effects on hosted application

Is it mandatory to refresh the application pool and website hosted on IIS 7.5 when are changes made to the web application's web configuration ?
It does it automatically, so no it's not mandatory to do it a second time, it just happens. :)

IIS 6.1 with window authentication keep asking for login

I have an application running on IIS 6.1 with .NET framework 2.
At IIS's Authentication, I had disabled Anonymous Authentication and enabled Windows Authentication (with NTLM on top). Because this application is for internal use only and the authentication will be based on user's NT account from AD.
When I tried to launch the application, everything is ok. But when I wanted to view other pages that are in the different folder with the default page, IIS keep asking the users to login. And when I tried to login with my NT account, it failed.
So I looked for the event log and found out the event ID is 5011, which is 'Web sites and Web applications depend on the availability of Internet Information Services (IIS) application pools. IIS application pools in turn depend on the Windows Process Activation Service (WAS). If WAS is not running or errors occur during the startup or shutdown of an application pool, Web sites and Web applications may not be available.'
I would like to let the user to browse the application without having the login window keep showing.
Please help.
Check that the user's domain accounts have file level permissions (Read only is sufficient) to the website files.

Why a new windows user profile is created when I create an Application Pool in IIS

I was recently cleaning up my file system and observed that there were few users, which I never created directly, in the c:\users* directory. This is supposed to have all those users which was created/logged in on local machines. I observed that these usernames are same as the name of Application Pools I have created in the IIS.
To confirm I created a new Application Pool in IIS and then observed this directory. Still it was not there. Later I created a new web site, assigned this application pool and accessed that website from browser, and then I see a new user profile with the name of the new application pool.
Question is - Why does it create a user profile for every IIS Application Pool? Is it absolutely necessary to have, and can it be configured for not creating? Will there be any downside? I do not remember to have seen this in earlier IIS i.e. 6.0.
My environment - Windows 7 64 Bit, IIS 7.5
I tried to google, but most links tell me how to configure User/Identity with app pool and stuff, but nothing specific about these questions.
This behaviour is because of the new security model starting with IIS 7.
Application Pool Identities started with IIS 7
Application Pool Identities allow you to run Application Pools under a unique account without having to create and manage domain or local accounts. The name of the Application Pool account corresponds to the name of the Application Pool.
- Application Pool Identities (2009)
The main reason is security, each application pool is isolated from each other.
LoadUserProfile=true Creates the User Profile Folder
From experimenting on my machine I believe this setting is responsible for the folders being created.
Having LoadUserProfile set to true means that IIS will load the user profile for the application pool identity. This happens when the application is actually spun up, you can test this by creating a new app pool and if the setting is false, no new folders should be created under C:\Users when you hit the web site for the first time.
- IIS Documentation
According to the documentation LoadUserProfile should be false by default, although I have noticed that on Win 7 machines it might be set to true instead. You can change this default via the IIS gui:

Application pool Idenity issue for ASP in IIS7.0

I've an issue while running asp on IIS7.0 with application pool identity set with domain user. I need a piece of code to run under browser client id(LOGON_USER variable) and remaining code under application pool identity. Can some one please help me how to setup IIS for this scenario?
I've a logonpage which needs to get details from LDAP. Since its running under Application pool idenity. its fetching details for application pool identity rather than user details. Can some one advice me how I need to configure IIS7.0 to retireve client details still running under application pool identity set to domain user
After two months of digging found a solution which was pretty simple.
1.My main application which was running under specific user identity, I left it untouched
2.I added a new virtual directory under sam application and moved on the log on page to new virtual directory.
3. Physical path credential for this application was 'pass through'. Changed the autherization to windows authentication.
4. Redirected to my page on sucessfull authentication, Needed to do minimal code changes as well
Thanks all

Resources