Monday, September 13, 2010

How To Solve Error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path"


I have installed MS Visual Studio 2010 Ultimate Edition in Windows 7 Ultimate edition. I created a WCF service and and want to consume the service from Web Application. The WCF is basically read a table from a MS SQL database that instantly attached to SQLExpress when the WCF is started.

I found the WCF service failed to read the data and generate this error message :

"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."

After checking MSDN then i found the work around to fix the problem :

1. Open the IIS management console to find which application pool used to start the WCF service

2. Change the Identity to run that application pool to NETWORK SERVICE

3. Restart the IIS Server using this command
net stop iisadmin /y
net start iisadmin /y

No comments:

Post a Comment