IIS 7 and Above
ASP.NET 4 page returns a 500 error
Last post Mar 26, 2012 08:46 AM by fab777
Mar 22, 2012 08:46 PM|mmcglynn|LINK
I have an ASP.NET 4 page returns a 500 error. This is a single page with a single
I have been troubleshooting this issue for 5 hours.
The website's permissions are:
The Physical Path is:
The permissions on the physical path folder are:
The application pool is set for .NET Framework v4.0.30319 using managed pipeline mode: Integrated. Classic mode has been tried as well.
The web.config file contains the following lines:
<compilation debug="true" targetFramework="4.0">
IIS Authentication is set to Anonymous Authentication - Enabled
Physical Path > Test Settings shows the following warning:
"The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read
access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that <domain>\<computer_name>$ has Read access to the physical path. Then test these settings again."
I have tried everything that I have read to fix that, but nothing changes the outcome of a 500 error
Single log entry:
2012-03-22 19:24:16 172.16.35.115 GET /Default.aspx - 80 - 10.1.11.107 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:11.0)+Gecko/20100101+Firefox/11.0 500 21 13 203
This is new for me, I never spent this much time getting a web page to load.
Can anyone help?
Mar 23, 2012 04:42 PM|fab777|LINK
which account is used as Application Pool Identity?
Do you have any entry in the application event log?
Mar 23, 2012 05:03 PM|mmcglynn|LINK
>>which account is used as Application Pool Identity?<<
Do you mean under which account is w3wp.exe running?
>>Do you have any entry in the application event log?<<
The current identity (XXXX\xxxxxx) does not have write access to 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files'.
This is only when browsing locally, though, and seems unrelated. When the app pool is set to use the .NET 2 framework, a, .NET 2 specific page will render. When the app pool i set to use .NET 4, a .NET 4 specific returns the 500 error.
Mar 23, 2012 05:13 PM|fab777|LINK
Yes, that's what I mean
Mar 23, 2012 06:11 PM|mmcglynn|LINK
The Application Pool Identity is running as DefaultAppPool. What should it be?
Mar 26, 2012 08:46 AM|fab777|LINK
It's recommended to use a dedicated account, for each application pool. And an application pool for each site.
If you want to keep tje DefaultAppPool account, you'll have to grant NTFS permissions for it on the website directory :
/grant "IIS AppPool\DefaultAppPool":RX