Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi friends,
I am going to publish web site on IIS 6, my connection string in web config file is,
C#
<connectionstrings>
<add name="pvconnstring" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\pv.mdf;Integrated Security=SSPI;Connect Timeout=30;User Instance=True" providername="System.Data.SqlClient" />
</connectionstrings>

I got the web site in explorer but when I perform the task of sql server it gives error that opening connection is
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.

Please help me.
Posted
Updated 31-Mar-12 21:19pm
v2
Comments
maheshpardeshi 1-Apr-12 2:10am    
I got the answer
go to iis right click on defaultwebsite ->addvaced setting ->user profile true
Shahriar Iqbal Chowdhury/Galib 1-Apr-12 3:20am    
updated formatting

Hi ,
    on your SQL Management studio in object explorer right click on security create new login >> Search >> advanced >> Find now >> select Name ASPNET then press ok and from combo box select name of your Data Base 
Note :
      sometimes you will not find ASPNET in this case you can select IIS_USERS .

Best Regards
M.Mitwalli
 
Share this answer
 
add user profile inside your database in Security folder and give it permission to access the database
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900