用户“IIS APPPOOLASP.NET v4.0"登录失败 [英] Login failed for user 'IIS APPPOOLASP.NET v4.0'

查看:26
本文介绍了用户“IIS APPPOOLASP.NET v4.0"登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Web 项目(C# Asp.Net、EF 4、MS SQL 2008 和 IIS 7),我需要将它本地迁移到 IIS 7(目前与 CASSINI 一起工作正常).

I have a web project (C# Asp.Net, EF 4, MS SQL 2008 and IIS 7) and I need to migrate it to IIS 7 locally (at the moment works fine with CASSINI).

在 IIS 本地,我有我的 默认网站 和我的部署.我的部署和 Default Web Site 都在池 ASP.NET v4.0(查看设置的图像)池目标 Framework 4 上作为我的 Web 项目.访问网站时,浏览器不显示页面,而是允许浏览器下载页面.

Locally in IIS I have my Default Web Site with my deploy. Both my deploy and Default Web Site are on pool ASP.NET v4.0 (look image for settings) the pool target Framework 4 as my web project. When visiting the site, the browser does not show the page and allow the browser to download the page instead.

我在本地 IIS 上运行了其他项目,它们正常工作(但它们不使用实体框架).

I have other projects running on IIS locally and they work with no problems (but they do not use Entity Framework).

使用事件记录器我看到如下错误:

Using the Event Logger I see errors as below:

Exception information: 
    Exception type: EntityException 
    Exception message: The underlying provider failed on Open.
   at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)


    Login failed for user 'IIS APPPOOLASP.NET v4.0'.
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)

相关问题

更新:您可以阅读有关此问题的资源,必须按照他的回答中的 arift 解释手动授予 MS SQL 2008 的权限.使用 IIS 7.5 和 MS SQL 2008 R2,不需要手动设置权限.

UPDATE: You can read in the resources on this question that permissions must be granted on MS SQL 2008 manually as arift explain in his answer. Using IIS 7.5 and MS SQL 2008 R2, setting manually permission should not be necessary.

推荐答案

您可以从 IIS7 -> Application Pools -> Advanced Settings 更改 ApplicationPoolIdentity.

You can change the ApplicationPoolIdentity from IIS7 -> Application Pools -> Advanced Settings.

在 ApplicationPoolIdentity 下,您将找到本地系统.这将使您的应用程序在 NT AUTHORITYSYSTEM 下运行,默认情况下这是数据库的现有登录名.

Under ApplicationPoolIdentity you will find local system. This will make your application run under NT AUTHORITYSYSTEM, which is an existing login for the database by default.

在应用此建议之前,您应该注意并了解安全隐患.

这篇关于用户“IIS APPPOOLASP.NET v4.0"登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆