IIS7 Login failed for user IIS APPPOOL\ASP.NET v4.0

來源:互聯網
上載者:User
文章目錄
  •  
 

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 use the NetworkService account (or the less secure LocalSystem account).  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. Open Internet Information Services (IIS) Manger.
  2. In the Connections sidebar, drill down into Default Web Site and click on your website.
  3. Now in the Actions sidebar (on right side), click on Advance 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. Open Internet Information Services (IIS) Manger.
  2. In the Connections sidebar, click on Application Pools.
  3. Now right-click on theApplication Pool that your website is using (in this case my site is using the ASP.NET v4.0 application pool), and select Advanced 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 account to NetworkService (or if you want LocalSystem), then click OK, and click OK again to save your Advanced Settings changes.

After changing the Application Pool’s Identity to NetworkService (or LocalSystem) you should 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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.