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

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!

Related

IIS giving 503 error while using ApplicationPoolIdentity

We are recently observing a very weird issue in IIS. This is the new Windows 2012 R2. We have installed all the component of IIS and trying to host default website on port 80.
Whenever we are trying to access the default web page of IIS, I am seeing "HTTP Error 503. The service is unavailable" error. While troubleshooting more, have observed that IIS Application pool is getting stopped and in the event logs we are seeing following error.
"The identity of application pool DefaultAppPool is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives it first request"
DefaulAppPool identity is ApplicationPoolIdentity.
As of now tried with following options but no luck. Note that same configuration is working on another server and I am unable to find out any difference on both the servers. IIS version is 8.5
Logon batch rights provided to IIS AppPool\DefaultAppPool as well as for IIS_IUSRS
Executed aspnet_regiis -ga "IIS AppPool\DefaultAppPool" for .NET folders
Full rights of WebSite root directory to IIS AppPool\DefaultAppPool
Reinstallation of IIS
Load User Profile : False / True with ApplicationPoolIdentity
Force update of Group policy post changin logon batch through gpupdate /force
Full Control to
a) HKLM\SOFTWARE\Microsoft\SystemCertificates\
b) HKLM\SOFTWARE\Microsoft\EnterpriseCertificates\
c) HKLM\System\CurrentControlSet\services\eventlog\Security\
d) access to C:\Windows\SysWOW64\config\systemprofile\AppData\
Do anyone have any idea in this?

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.

access to the path is denied after deployment iis

I have an asp.net webapplication that uploads files from specific folder on the server. locally everything works fine, but when I deploy the application to the Webserver, I begin getting the error:
"Access to the path "Access to the path
'\192.168.16.5\Files$\2\tmp\MV12148B-801_DWG1.CGM' is denied." is
denied".
Shares with a "$" suffix are administrative shares and only those with administrative permissions are able to use them. More-than-likely the account under which your IIS website is running (specifically, the account under which your website's Application Pool is running) does not have administrative rights--nor should it.
I suggest giving it a "regular" share name and then you can better control the permissions associated with that share.
Give the identity--under which your Application Pool is running--write permissions to the new (regular) share that you set up.
If the Identity for your App Pool is "ApplicationPoolIdentity", then the account name to use is:
IIS AppPool\{application_pool_name}
Therefore, if your App Pool name is DefaultAppPool, then this user account name is:
IIS AppPool\DefaultAppPool

Accessing a file on the server from my asp.net web application

In my asp.net web application I am trying to retrieve images from a shared network folder. When I put this website live in IIS, I am getting an error that "Access to the path is denied" when I try to access the network folder. What is considered the user that IIS uses, and how would I grant permissions to the network folder?
Thank you.
The issue is because your application pool identity or the user that IIS is using to run the worker process does not have permissions on the network path.
You may want to grant this user permission on the network path. However, if you are using IIS AppPoolIdentity that is not possible as they are built-in account per machine. As is the same with any buit-in account.
I would advice you to use a network account and give that account appropriate permissions on both IIS and the network share.
You may have to add this user to the IUSR group.

401.1 Error when accessing virtual directory pointing to network share

IIS5 is running on SERVER1.
One of the virtual directories in IIS, myfiles, is pointing to "A shared location on another computer", //SERVER2/myfilesshare
When I try to access the page:
http://SERVER1/myfiles
... I get the error:
You are not authorized to view this page
HTTP 401.1 - Unauthorized: Logon Failed
Internet Information Services
I have triple-checked the "Connect As..." settings in IIS. The credentials I'm using to access the share are correct-- they work when connect to the share in Windows Explorer, but not through the IIS virtual directory.
I've tried granting full permission to Everyone on the folder in SERVER2, but no luck.
Any thoughts?
This was how I solved my problem, might help you.
By default, IIS uses local user called IUSR for virtual directories when using anonymous authentication. It does not use application identity, which should be obvious, if you use procmon.
How can you force it to use application identity?
Easy, under IIS manager:
1) go to Authentication
2) Edit "Anonymous authentication"
3) Select "Application pool identity"
4) Restart IIS & it should work.
The same accomplished with PS: Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/AnonymousAuthentication -name username -value ""
This link contains the pros/cons: http://blogs.technet.com/b/tristank/archive/2011/12/22/iusr-vs-application-pool-identity-why-use-either.aspx
Permission issues can be tricky. Try running filemon on the 'other computer' It can be downloaded over here: http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx
(it's not a big application just a tiny lightweight tool)
After you've started filemon, stop the monitor process (I believe it's turned on by default when you start the application), clear the logged data, create a filter for the folder you have trouble getting access to. Start the monitor process. Request your webpage. Stop the monitor process and look for "access denied" messages in filemon. When found, filemon will also mention the name of the actual user which is trying to get access. This might help you to get to a solution.
Btw when using Windows Server 2008 you will need processmon instead: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
Imagine a scenario where for whatever reason you want to have your IIS Server access a Share on a File server and they are not on the same domain.
If you can follow and get this to work for you (I have done it Win2008-R1 32-bit File Server and Win2008-R2 64-bit with IIS 7), then you should be in good shape for any scenario.
Same name local account on both servers with same password
On IIS, use aspnet_regiis -ga MyAccount to give local account access to IIS guts
Now use that as the Application Pool Identity of the Website
Using Local Security Policy (Admin Tools) enable trust for delegation for local account
Restart IIS server
On File Server, use Local Security Policy to enable access from network for local account
Create Share granting desired permissions to local account (also Security tab permissions as needed)
Open up File & Print Sharing ports on both (as restrictive as possible) to point where it works for you when you are using Windows Explorer between the two
Back to IIS, create Virtual Directory using UNC path to Shared folder from File Server
Just use Pass-through authentication (which would use your local account)
You can tell Anonymous Authentication setting of the Virtual Directory to use Application Pool Identity as well
Use something that will test/verify. The key really is trust for delegation using a Service Account (domain or otherwise), and having IIS use the account you want it to use instead of Local Server or Network Service.
This took me all day to figure out. Various threads in StackOverflow and other Internet sources helped point me to various resources me but didn't find my exact answer anywhere. Hopefully next person stuck with this problem will get a speed boost on the path to resolving with my description of what worked for me.
try enabling windows authentication on the virtual directory security tab (in IIS).

Resources