Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Local 由于检索用户失败,无法生成SQL Server的用户实例';的本地应用程序数据路径。_Local - Fatal编程技术网

Local 由于检索用户失败,无法生成SQL Server的用户实例';的本地应用程序数据路径。

Local 由于检索用户失败,无法生成SQL Server的用户实例';的本地应用程序数据路径。,local,Local,“/”应用程序中出现服务器错误 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

“/”应用程序中出现服务器错误

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.

Source Error: 


Line 54:             if (_con.State == ConnectionState.Closed)
Line 55:             {
Line 56:                 _con.Open();
Line 57:             }
Line 58:         }

Source File: D:\kuwait\21JAN2014\kuwait_ON_26-2-2013\WebMediSmart\AdminPages\HospitalMaster.aspx.cs    Line: 56 

Stack Trace: 


[SqlException (0x80131904): 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.]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009598
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +183
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +5023255
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
   System.Data.SqlClient.SqlConnection.Open() +125
   WebMediSmart.AdminPages.HospitalMaster.InitializeConnection() in D:\kuwait\21JAN2014\kuwait_ON_26-2-2013\WebMediSmart\AdminPages\HospitalMaster.aspx.cs:56
   WebMediSmart.AdminPages.HospitalMaster.GetHospital() in D:\kuwait\21JAN2014\kuwait_ON_26-2-2013\WebMediSmart\AdminPages\HospitalMaster.aspx.cs:81
   WebMediSmart.AdminPages.HospitalMaster.Clear() in D:\kuwait\21JAN2014\kuwait_ON_26-2-2013\WebMediSmart\AdminPages\HospitalMaster.aspx.cs:72
   WebMediSmart.AdminPages.HospitalMaster.Page_Load(Object sender, EventArgs e) in D:\kuwait\21JAN2014\kuwait_ON_26-2-2013\WebMediSmart\AdminPages\HospitalMaster.aspx.cs:29
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
版本信息:Microsoft.NET Framework版本:4.0.30319;ASP.NET版本:4.0.30319.1
打开iis中发布的页面时获取错误。该解决方案在visual studio中运行良好。

在ISS上部署网站时,我也遇到同样的问题,但我从另一个页面获取解决方案

请参阅本页

我的解决方案是

->打开IIS管理器并选择应用程序池

->选择并右键单击池,然后选择高级设置

->在流程模型下选择identity,并将其更改为LocalSystem

->重新启动IIS或网站并浏览网页

问题解决了