I am trying to my C# program to a SQL Database. This is my code for making the c
ID: 3765534 • Letter: I
Question
I am trying to my C# program to a SQL Database. This is my code for making the connection: SqlConnection con = new SqlConnection(@"Data Source=LORI-PCSQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQL10.SQLEXPRESSMSSQLDATAProjects.mdf;Integrated Security=True;User Instance=True"); However, I get an error that states that an error occurred in the pre-login handshake and that the wait operation timed out. I'm assuming that this is because I don't have my login information on my connection string anywhere, but I could be wrong. Please help.
Explanation / Answer
Answer :
Try to run The following command in command Prompt
netsh Winsock reset
(or)
Clean your VS.Net Solution--> Rebuild Project.---->Reset IIS---->Run the project again.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.