Project migrated from old PC and from VS2010 to VS2012 "The wait operation timed out." - asp.net-mvc-3

I just got a new Windows 7 computer with VS 2012. My old box was Windows XP with VS 2010. I copied over my project and had VS2012 upgrade the project and get the following error when running the ASP.NET MVC 3 application:
[Win32Exception (0x80004005): The wait operation timed out]
[SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.)]
[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
[ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.]
That was the order of the messages. I am connecting through EntityFramework (code first). The connection string was working just fine in VS2010:
Data Source=xxx.xxx.xxx.xxx; User ID=xxxxxx; Password=xxxxxxxxx; Initial Catalog=xxxxxxxxx; MultipleActiveResultSets=true
I have been searching for hours with no real solution. The only one I haven't tried is to remove VS 2012 and .NET 4.5. That would be a problem since then I can't code. I have tried to remove .NET 4.5, but then VS2012 doesn't start. I have installed .NET 4.0.
I have installed (only listing software based on what I have see in searches):
VS 2012
Windows 7
SSMS 2010 (which was initially installed after VS 2012)
I have done a repair on VS2012 as well. I have not uninstalled and reinstalled it.
Any thoughts? I am going nuts here. Right now I have a quad-core pc that can remote desktop REALLY fast to my old clunker.
NOTE: My firewall is off. I have Symantec Endpoint Protection and this is connecting to a live SQL server, so I know it's running.

Amazingly, this worked:
netsh Winsock reset
See Can't connect to database after installing VS 11 Pro Beta

Related

NuGet Unable to load the service index for source Authentication failed

Since today for some reason I'm unable to connect to the NuGet package manager through Visual Studio.
[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream.
But I cannot get it to work again...
Things I tried.
Delete NuGet.config
Clear NuGet cache
Disable TLS1.0 and TLS1.1 explicitly
Enabled TLS1.2 explicitly
followed the manual from nuget at https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/
Different Visual Studios
Update to the latest Visual Studio 2019
Tried different TLS settings in the RegEdit for 1.0, 1.1 and 1.2. I don't have a TLS1.3 section yet.
I can browse to https://api.nuget.org/v3/index.json with chrome
TLS1.2 Client settings:
TLS1.2 Server settings:
Specs:
Windows Server 2012R2, Visual Studio 2019
Also tried it on a different Windows Server 2012R2 machine and same problem
It is still working on my laptop with Windows 10.
Hopefully someone has an idea.
Thanks
I had the same problem.
The solution was to install the microsoft/artifacts-credprovider as mentioned here
Invoke-Expression "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx"
Had exactly the same problem, running script from https://github.com/microsoft/azure-devops-tls12 and following instructions from it helped me.
In my case it generated additional script file, after running that and restaring pc nuget was working once again.

TF400324: Team Foundation services are not available. Could not create SSL/TLS secure channel

TF400324:Team Foundation services are not available from server xxxx
Technical information (for administrator):
The request was aborted: Could not create SSL/TLS secure channel
Some of our developers are getting the error above whilst working with TFS but only after having Visual Studio open for about 5-10 minutes. We are currently working around this issue by closing and opening Visual Studio as it seems to be connecting fine just after openning.
Note that this is not all of our developers and all developers are on the latest version of visual studio version 15.9.1 and the TFS server is 2015.
Our tfs website where we manage our sprint boards is fine and the certificate is valid until 2020. We recently updated our certificate to a wildcard e.g. *.mywebsite.com.
What we have tried:
IIS Crypto 2.0 from Nartac Software to check Protocols/Ciphers on clients and servers
Clearing the TFS cache folders on the client machines
A complete fresh install of visual studio, sign in and connection to TFS
Regedit HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319: SchUseStrongCrypto for both 32bit and 64 bit. Found here https://johnlouros.com/blog/enabling-strong-cryptography-for-all-dot-net-applications
Using a different microsoft login (also verified that mine works on other machines)
None of the above have solved the issue. What is puzzling me the most is that it works for a period of time before displaying the error, once the error has been displayed it seems that it never tries to reconnect to the TFS server so requires a fresh instance of visual studio before it attempts and successfully reconnects.
I found the answer here: https://developercommunity.visualstudio.com/content/problem/356394/tls-10-the-request-was-aborted-could-not-create-ss.html
The issue happens because VS 15.9 attempts to use system defaults for TLS handshake, but it is being to set to TLS1.2 somewhere within VS. While Microsoft works on a fix, you can work around this by setting this registry key
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000000
This should force .net to use system defaults (rather than TLS 1.2) and that should help negotiate gracefully down to TLS 1.0 if the TFS server is set to support only TLS 1.0.
That worked for me for VS 15.9.3 just fine (needed to restart VS though).

tfs31001 : cannot connect to tfs

I installed VS 2012 and connect to TFS but because of the framework 4.5 problems I had to uninstall framework 4.5 installed VS 2010 but now I cannot connect to TFS.
I added the server, but gives error when I try to connect to project collection.
I uninstalled VS 2012.
I cannot delete the local workspace and I think that might cause the problem. I get error:
TF31001: cannot connect to team Foundation Server at SERVERNAME. The server returned the following error: Field not found: 'Microsoft.TeamFoundation.IntegrationServiceIdentifiers.SyncService.'
PS: My teammates can connect to the server.
How can I get over this issue?
Thanks in advance
Did you already tried to go to the TFS through a webbrowser by surfing to it from your machine? And did you installed this piece of software to your visual studio 2010
This may appear like a strange answer but have you tried clearing your Temporary Internet files and cache? I've had a couple of problems over the years with TFS and have found this works for me generally with connectivity issues. Reference: http://technet.microsoft.com/en-us/subscriptions/ms244130(v=vs.90).aspx

Cannot start debugger on Visual Studio 2010 (F5) However, ' attach to process' does work (slow). How to fix?

The environment:
Clean (new) install of Windows 7 64bit.
Clean (new) install of Visual Studio 2010 Professional (10.0.30319.1).
Windows Update is up to date.
The problem:
I cannot start the debugger on Visual Studio 2010 (hit F5): 'Unable to start debugging on the web server. Unable to connect to the web server. Verify that the web server is running and that incomming HTTP requests are not blocked by a firewall.'
However, 'attach to process' (what I usually do) does work, but it is painfully slow to start (Visual Studio 'thinks' a lot of time before the debugging is actually enabled).
On the same hardware, running VS 2008 on good old Windows XP (32bits), this problem never happened.
Trying to debug a site running under the ASP.NET Development Server also fails: 'Unable to connect to ASP.NET Development Server.'.
There are plenty of web pages about these errors (many very outdated and does not apply to my environment), none of them worked for me.
Notes:
No matter if I run Visual Studio as Administrator or not. The problem is
the same.
The problem happens even when running a brand new blank IIS web site, either created as 'localhost/something' or 'sample.local'.
If I create a 'File System' web site (to try ASP.NET Development Server), when I hit F5, the server starts, but after a long wait Visual Studio says 'Unable to connect to ASP.NET Development Server.'
The 'hosts' file has an explicit 127.0.0.1 entry for 'localhost' and for 'sample.local'
It's the same problem either running .NET 2.0 or 4.0.
It's the same either configuring the application pool with or without 'Enable 32-Bit Applications' true or false.
It's the same either configuring the application pool is classic or integrated mode.
In a desperate attempt, I've added all the IIS 6.0 legacy 'features' stuff (not needed!) and doesn't helped at all.
I don't now what else I can try.
Thanks.
OMG!, I'm so stupid. The most oblivious thing was truly wrong. There was a wrong rule in the firewall. Therefore, even being in 'interactive mode' (as it is was always set), the connection was denied.

Windows 7 - Enable Network DTC Access

I have a Visual Studio 2010 Windows Forms application in which I start a transaction using the TransactionScope class. I then Receive a message from a Sql Server Broker Services message queue, which works fine. I next try to call a stored procedure from the same database with a call to my data access layer which is a Visual Studio dataset (xsd file). When I make this second call to the database I get the following error message:
The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B).
I've seen several posts on the web that talk about Enabling DTC access through dcomcnfg.exe, and allowing DTC to communicate through Windows Firewall. I've done those things, and am still having this problem. I know our remote database server is setup to Enable DTC access, because we are using similar transactions in other projects built with Visual Studio 2008 on Windows XP and Vista. I think there is something specific about Windows 7 and Visual Studio 2010 causing this problem, but haven't been able to find out what it is. Can anyone help with this problem?
I just saw a post on the web from another programmer having this problem (http://www.pcreview.co.uk/forums/thread-3977150.php), he says it works fine on Windows 7 - x86, but gets this error on Windows 7 - x64. I'm running the x64 version of Windows 7, does anyone know if there are problems with MSDTC on Windows 7 - 64 bit version?
It turned out that I was leaving a database connection open in my Receive call to the SQL Server Service Broker, then trying to make a new connection to my data access layer. That was causing the problem, the fix turned out to be to close the first connection before opening the second one.

Resources