Failed to generate a user instance of SQL Server due to failure in retrieving the user's local appli...

建了一个asp.net网站,使用membership身份验证,在VS2010里调试运行时,一切正常,但是到了IIS(7.5)下,就出现了如下错误:

image

Server Error in '/me' Application.
--------------------------------------------------------------------------------

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
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: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

 

经过一番尝试,现提供有效解决办法:

我的网站使用的是默认应用程序池(DefaultAppPool),在DefaultAppPool上右击,选Advanced Settings… , 在弹出窗口里面的Process Model项中,将Load User Profile的值改为True。重启网站服务,运行成功。

 

image

转载于:https://www.cnblogs.com/zxppc/archive/2010/09/20/1831979.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值