Failed to generate a user instance of SQL Server
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.
I am Using SQL Express Not SQL Server in the Development mode. In the DEvelopment mode its working fine. After giving publish i am getting this issue how to resolve it.
This error can be recreated by first creating the site via the Project Manager, then following the setup instructions "Running a project on IIS 7.0 or IIS 7.5" in the Installation and Administration Guide. If you're using Microsoft SQL Server Express, somewhere between steps 11 and 14 it should note for you to open the application pool's Advanced Settings and set the "Load User Profile" option to "True".
This fixes the issue for us, your mileage may vary.
Jason,
Thanks a lot for posting this. I've been banging my head against the wall for an hour.