Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. The connection will be closed <p>I am designing asp.net mvc3 project. I have used database that designed in SQL Server, and I have added by ado.net connection. When I run this project then it works correctly, but when I publish this website using IIS manager then it gives following error in data access:</p> <blockquote> <p>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.</p> </blockquote> <p>Please help me what should I do.? </p> <p><br /></p> <p><strong>Update:</strong> this is my connection string:-<br> (pasted and formatted from comments - <a href="http://stackoverflow.com/users/5662/andrew">Andrew</a>)</p> <pre><code>connectionString="metadata=res://*/Models.TestModel.csdl| res://*/Models.TestMode‌​l.ssdl| res://*/Models.TestModel.msl; provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\moGileOrder.mdf; Integrated Security=True; User Instance=True; MultipleActiveResultSets=True&amp;quot;" providerName="System.Data.EntityClient" </code></pre>