惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
S
Securelist
MyScale Blog
MyScale Blog
Jina AI
Jina AI
罗磊的独立博客
The Cloudflare Blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
雷峰网
雷峰网
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
博客园 - 聂微东
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
Attack and Defense Labs
Attack and Defense Labs
博客园_首页
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
D
Docker
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
V2EX - 技术
V2EX - 技术
N
News | PayPal Newsroom
Microsoft Security Blog
Microsoft Security Blog

博客园 - 龚振

T4 模板编辑。 MVC 表单验证的几种方式: Keycode对照表 使用多字节字符集 syslink 不显示 Windows下JSP开发环境的配置 javascript 大括号,圆括号 清空数据库日志 数据库还原错误 (with move) 打开visual studio 智能感知(intellisense) for Unity Application Blocks (翻译) firefox ie DOM 级兼容性(一) ie ,firefox 兼容性,收集。。。。。 IE6.0、IE7.0 与 FireFox 收集,总是忘,还是收集了,以后总结下 web 版 ftp 数据库迁移可能遇到的问题 将物理内存制作为虚拟硬盘,提高系统速度 NET设计模式总结 自定义控件状态保存 关于Web服务器时间格式问题 关于Gridview templateField 无法 sort
Login failed for user 'IIS APPPOOL\ASP.NET v4.0'. - 龚振
龚振 · 2012-04-15 · via 博客园 - 龚振

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

Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information 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'.

Source Error:

Line 44:         </tr>
Line 45: 
Line 46:     <% foreach (var item in Model) { %>
Line 47:     
Line 48:         <tr>

Solution:

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: