Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 317 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A connection was successfully established with the server, but then an error occurred during the pre-login handshake

#1
I am getting following error when i am trying to connect Production DB from Local Environment.

I was able to connect Production DB before, but suddenly i am getting following error, any idea?

>A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The handle is invalid.)

I was trying to run asp.net website in local PC, which has connection string of Production DB, following is stack trace for error I am getting in local environment.



> at MyWebsiteDAL.clsForumQuestion.SelectAll(Int32 CurrentPageIndex, Int32 PageSize) in D:\EDrive\My WebSites\MyWebsite\MyWebsite\MyWebsiteDAL\clsForumQuestion.cs:line 821
at CodeConnect.Default.Page_Load(Object sender, EventArgs e) in D:\EDrive\My WebSites\MyWebsite\MyWebsite\MyWebsite\Default.aspx.cs:line 100
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Any idea what might have gone wrong here?
Reply

#2
**Solution**

1) Clean your VS.Net Solution

2) Rebuild Project.

3) Reset IIS

4) Run the project again.

Basically that solved my problem, but in my case i was not getting this error and suddenly my local environment starts giving me above error, so may be that trick work for me.
Reply

#3
You might want to check a few things:

1. You production server allows remote connections. (possible that someone turned this off, especially if you have a DBA)

2. Check your connection string. Sometimes if you are using an ip address or server name this will cause this error. Try both.

Reply

#4
Had the same issue, the reason for it was BCrypt.Net library, compiled using .NET 2.0 framework, while the whole project, which used it, was compiling with .NET 4.0. If symptoms are the same, try download [BCrypt source code][1] and rebuild it in *release configuration* within .NET 4.0. After I'd done it "pre-login handshake" worked fine. Hope it helps anyone.


[1]:

[To see links please register here]

Reply

#5
I had the same problem, I was storing session data in the database, the connection string had **Encrypt=True** in it, which I assume told the sql client to connect to the server in secure (SSL) mode, removing this helped!
Reply

#6
I had this same problem and was having no luck with the suggested fixes. I then came across [this article][1] and saw the comment from Mirrh regarding a program called Sendori blocking the LSP. No idea how it got on my computer but there it was and removing it fixed the issue.

If the article doesn't work just check your Programs and uninstall Sendori if you see it.


[1]:

[To see links please register here]

Reply

#7
In my case it was:

`Persist Security Info=True;`

in my connection string that needed to be removed. Once I did that I no longer had issues.
Reply

#8
I restarted **SQL Server (Sharepoint)** service and it solved the issue.
Reply

#9
Running the following command worked for me:

netsh Winsock reset

Seen at

[To see links please register here]

Reply

#10
I experienced this error and did all the suggestions from you guys here but none had any effect for my error.

I caught the culprit: if you are using ` *.ini` file for your system, you might want to check what server name was input there and make sure it is the same as the one in your web.config connection string.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through