Click here to Skip to main content
15,944,837 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi.
i have wite a site in visual stadio 2010 with asp.net with C#. i have a Microsoft SQLSERVER 2008 on my system and my os is win7.also the SQLEXPRESS of vis 2010 is installed on my system.
firstly my database was on SQLSERVER 2008.
so i carry my database file to APP_DATA folder in my asp solution and attach automaticly to sqlexpress.
i try use my sit on iis but can not connect database,pages is opend but database not work.and this error is created on my browser:

"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."
how can i solve this problem?
and my connection string in web.config is:

XML
<connectionStrings>
        <remove name="LocalSqlServer" />
    <add name="Porpos_webConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Porpos_web.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient">
    </connectionStrings>
Posted

1 solution

 
Share this answer
 
Comments
r.kh 6-Sep-12 15:44pm    
thank.

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