Iis7 login failed for user IIS apppool \ ASP. NET v4.0

Source: Internet
Author: User
Document directory
  •  

After running a ASP. NET Website on IIS 7.5 for the first time on a Windows 7 computer, I was faced with the following error message:

Login failed for user 'IIS APPPOOL\ASP.NET v4.0'. Description: An unhandled exception occurred during the executionof the current web request. Please review the stack trace for moreinformation about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.

To fix this issue, try changing the (Process Model) Identity of your website's application pool to useNetworkServiceAccount (or the less secureLocalSystemAccount). By default, iis7 seems to set the application pools identity to 'applicationpoolidentity ', instead of NetworkService or LocalSystem.

Here's a step-by-step guide to determining your websites application pool, then changing its process model idenitty in iis7:

  1. OpenInternet Information Services (IIS) manger.
  2. InConnectionsSidebar, drill down into default web site and click on your website.
  3. Now inActionsSidebar (on right side), click onAdvance settings...In the popup box, under general you will see your application pool listed for your website (in my case the app pool is: ASP. NET v4.0 ).
  4. Click Cancel... If you choose, you can change the application pool here, but for the sake of this example we just wanted to find out what the website's app pool was.

Now that we know the application pool that is configured for are website, we now want to change the app pool's (Process Model) identity to 'networkservice', here's how:

  1. OpenInternet Information Services (IIS) manger.
  2. InConnectionsSidebar, click onApplication pools.
  3. Now right-click on theapplication pool that your website is using (in this case my site is usingASP. NET v4.0Application pool), and selectAdvanced Settings...From the menu.
  4. In the advanced settings pop-up box, locate the process model-> identity section and click on the application pool identity.
  5. In the application pool identity pop-up box, change the built-in accountNetworkService(Or if you want LocalSystem), Then clickOK,And clickOKAgain to save your advanced settings changes.

After changing the application pool's identity to NetworkService (or LocalSystem) You shoshould now be able to get your asp. Net Site to run successfully on a iis7 web server.

Source from http://www.gotknowhow.com/articles/fix-login-failed-for-user-iis-apppool-aspnet-v4-error-iis7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.