Application pool Idenity issue for ASP in IIS7.0 - security

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

Related

NLB IIS Integrated security asks for credentials?

I have a 2 node NLB running IIS. Servers are identical in every respect. When on the server I can browse to the local Windows Integrated Security site without any problems using the local member name. But when I switch to it's cluster name, it prompts me for credentials.
<- Renders just fine
<- Renders just fine
<- Prompts for credentials
Certificates aren't the issue. Non WI-Security sites work just fine.
Seems like it doesn't want to pass credentials across the cluster name (and most likely right back into the same server I am on. I did try a couple of affinity settings with no change).
Thanks all for any ideas.
Nick
This has to do with the way Kerberos delegation works with Windows Integrated security.
In short, here's what you'll need to do:
Set the identify of the application pool running your website to a domain user, on all IIS servers participating in the NLB cluster
Ensure this domain account is in the IIS_USRS group on each web server
Create an SPN entry for your NLB cluster DNS name, and the domain user. For example:
setspn -S HTTP/ domain\accountname
Following this, you should be able to access your site without additional prompt for credentials.
A more detailed explanation is available here: https://blogs.msdn.microsoft.com/rakkimk/2006/12/08/enabling-kerberos-delegation-on-a-nlb-scenario/

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:

IIS 7.5 - How To Grant Read/Write Access For A non-local Share To Application Pool

Everything I've found via search on this talks about Read/Write for local drives only (typically C) and what I am having trouble with is getting the same Read/Write access for an application pool to a non-local drive, specifically a share on the file server.
We've set the Application pool to run the anonymous user under a domain account that we have explicitly verified has full control of the file share and yet the web app that use the application pool is unable to access this non-local share. It can however access a local copy of the shared folder if we copy the folder from the file server to the local drive.
This is a third party app and we'eve followed all the instructions from the vendor and so far this is unresolved. Their support is looking at this but I don't believe they have any idea on what's wrong. This same web app works fine with the same file server share when the web app is running under IIS6 on another sever so its something with IIS7.5. I figure its got to be something particular to IIS7.5 that is not in IIS6 that is the key.
Ideas?
FYI - The application pool is already set to classic mode.
I think that you will have to see the permission that you have. In iss7.5 you have the aplication pool running with an account, It can be a ApplicationpoolIdnetity, or a real one. if you want to access the share the application pool identity has to have rights to do so, or you can impersonate a user and then use the permission that user has to copy to the shared folder, i prefere to use the impersonate, only when is necessary i do the impersonate and do whatever i most do.

IIS6 app pool credential causes site to say "Access is denied"

Ok I'm stumped. I've configured an IIS 6 website with its own App Pool, which has its own AD domain credential. When I attempt to browse the site, I see a page that simply says "Access is denied.". There is no error code or information in Event Logs.
I am able to open Notepad with the app pool account credentials (and open the html file I'm trying to browse).
If I add the app pool's domain account to the local administrators group, the site loads. However, this is not acceptable for our environment.
I have successfully configured this site on two servers (that are supposed to be identical in a load-balanced pair). However, try as I might, I can't find any difference between these two servers' configurations.
Is your pool identity present in the local group IIS_WPG ?
This group ensure the Worker Process will have the required privileges to run correctly.
Also, your WebSite root folder must have Read permissions for IIS_WPG, which is the case if your root is in Inetpub\wwwroot.
Same for C:\WINDOWS\Microsoft.NET\Framework\vx.x.x.x\Temporary ASP.NET Files + Write, if you run ASP.NET WebSites.
FYI, in IIS 7, the group is now known as IIS_IUSRS.
Default permissions and user rights for IIS 6.0
Configuring Application Pool Identity in IIS 6.0
I reinstalled IIS 6 and the error has gone away. After reinstalling IIS, I had to reinstall .NET 4 as well.
Thank you very much for your suggestions and advice though!

ASP.NET 3.5 Permissions on IIS 6

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.

Resources