Click here to Skip to main content
15,911,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone, My friend gave me asp.net c# webapplication with sql server 2008 R2 files, data file and log file now i want to attach these files with my database and my data base is same (sql server 2008 R2) but when i try to attach i get this error (Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed ) plz some one can help me to resolve this problem.
Posted
Updated 27-Nov-13 23:59pm
v3

1 solution

Check your connection string: does it match your SQL server instance and user access?
One way to check is to try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file. Or in your case, compare against the one the application your friend gave you is using.
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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