Unable to connect on TFS in VS2010 [duplicate] - azure

I've been using git-tfs for almost 5 years, and then one day I got the following error when running git tfs fetch:
TF400324: Team Foundation services are not available from server https://tfs.company.com/tfs/foo.
Technical information (for administrator):
The underlying connection was closed: An unexpected error occurred on a send.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
I even opened Fiddler to see what was going on, and literally the TFS server disconnected the socket when my laptop attempted to connect.
After talking with one of our server admins I discovered that support for TLS 1.0 had been disabled on our TFS servers, and I think I've got my smoking gun. I think my laptop is attempting to connect to our servers using TLS 1.0, which of course causes the server to close the socket.
How can I change the version of TLS that git tfs uses when connecting to Team Foundation Services?

I figured it out, and as I suspected disabling TLS 1.0 on the Team Foundation Servers was the root of the problem. After googling git tfs tls 1.0 I stumbled across Enabling strong cryptography for all .Net applications, which led me to the fix. You need to enable strong encryption for .NET applications (duh, it says so in the title).
Open up a PowerShell command prompt, running it with elevated privileges
Run the following command for 64 bit applications:
# set strong cryptography on 64 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Run this command for 32 bit applications
# set strong cryptography on 32 bit .Net Framework (version 4 and above)
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Reboot.
Now my machine is happily pulling down a hundred or so check-ins from TFS.

I don't have much technical knowledge about TFS, but everyday i have to check-in my code from Visual Studio and recently i came across this issue. The above solution mentioned here,went from over my head.So,i tried a simpler way:
Logged out then logged in into the TFS again through Team-> Manage Connections.
Mapped my project again.
And Voila! i successfully checked-in my code. Maybe this will help others

Related

ClickOnce won't update when hosted in IIS 10.0 - Application download did not succed

I host ClickOnce application files under my IIS 10.0 (running on Windows 10), but when I publish a new update and try to update the application on my PC I get the error bellow. Details are shown below, but we can see "Unable to read data from the transport connection: An established connection was aborted by the software in your host machine." and "An established connection was aborted by the software in your host machine"
MIME type are configured on my IIS folder for .application, .deploy and .manifest.
Port is open on my firewall and router.
In Visual Studio, under Publish, file are generated with the .deploy extension. The update location is http://myurl:37113/SecondMarcheERPClicOnce/
Any idea on how to fix this issue?
Following Jalpa comment, I tested on my PC and the issue was there, caused by my antivirus... Firewall wasn't implied. So even if the error message point on my host, it was a lie!
Too there is a strange behavior here. If I install the apps locally, it will work (no surprise here). After, if I update it, so from my website (which is not recognized by my AV as it is a DynDns) it will show the error in my post. Disabling my AV (NOD32) for 10 minutes, the update will pass without any issue. After that, I reactivate the AV and every other update will pass without any issue even if I don't disable my AV.
Hope it help someone someday!

How to fix The request was aborted: Could not create SSL/TLS secure channel in microsoft exchange wed service

I am trying to read and send email using Microsoft exchange webservice API. I tried to run this code for Outlook version 2010 and 2016 in my VMs its showing
The request was aborted: Could not create SSL/TLS secure channel
where as same code for office 365 its working fine. I even tried manual accessing outlook mails with URL and credentials and I am able to do it but through code.
Hi, we are receiving attached error also, it seems to be relates with your issue. We have started receiving this today by the morning. Could it be like a Windows update or something? We are still investigating this issue.
I’ll try upgrading the .net environment and replacing the web.config currently 4.5.2 with the 4.6.1
EDIT:
Yes, we have solved that issue. We used IIS Crypto 2.0 software to revert all tls settings to it's server defaults on Day-1. Then don't forget to restart the server of course. I think that Windows updates messed up with the TLS settings on Windows servers. Hope this will fix your issue.

What TLS protocol does Server.CreateObject("Msxml2.XMLHTTP.6.0") use?

I'm using classic asp on IIS on Windows server 2012, and Server.CreateObject("Msxml2.XMLHTTP.6.0") to make soap requests against a payment processor, and "suddenly" it stopped working.
The payment processor has disabled TLS 1.0, we're supposed to do TLS 1.1 or 1.2; I think this is the cause of the problem...
How do I see and if needed change which protocol it uses?
Take a look here: https://learn.microsoft.com/en-us/dotnet/framework/network-programming/tls#systemdefaulttlsversions - specifically at sections SystemDefaultTlsVersions and SchUseStrongCrypto. You should also go ahead and disable all insecure ciphers/protocols/key exchanges in SChannel - the windows component responsible for SSL/TLS.
There is a GUI tool called IISCrypto from a company called Nartac that has some common profiles that are (somewhat) safer than editing the registry directly for disabling various obsolete components. see https://www.nartac.com/Products/IISCrypto.
Word of warning - be careful with your SChannel settings (either editing the registry or using IIS Crypto) - the settings are used throughout windows and are required for services like RDP and WinRM among other things - backup first, then test carefully.
I had similar situation - I have used Msxml2.XMLHTTP for API endpoint call in VB script and suddenly it stopped working. I got error "The system cannot locate the resource specified" and http.status returned 12029. The problem was not in the URL, it worked when I tried to call the URL from the browser. But when I started VB script, it has failed on the line http.send.
How I solved it finally?
I hade to install recommended update to my Windows Server 2012:
Microsoft .NET Framework 4.8 for Windows Server 2012 for x64 (KB4486081)
and I have installed one optional update too:
Internet Explorer 11 for Windows Server 2012 for x64
After this and server restart it started to work again. I can use both: "Msxml2.XMLHTTP.6.0" or "Msxml2.XMLHTTP", it does not matter.

Error when trying to remotely debug an azure website (HRESULT: 0x89710023)

I'm having troubles enabling remote debugging on sharepoint online. I have 2 machines, my local machine (Windows 8.1) and my development server(Windows Server 2008 R2). On my development server I first tried remote debugging using Visual Studio 2012 Update 4, as described here: http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/#remotedebug.
When this didn't work I tried doing exactly the same thing on my local machine, which has Visual Studio 2013 (Ultimate) update 1 and the latest windows azure sdk (2.3). This worked perfectly. Thinking upgrading to visual studio 2013 would solve my problem I've installed 2013 (Premium) on my dev server, next to 2010 and 2012. After installing and updating everything for 2 hours however, I came to the conclusion that I received the same error as on VS 2012.
Googling came up with a few interesting causes for this bug: sitenames longer than 20 characters or sitenames containing hyphens. This is not the case. Then I verified port settings, the dev server has no active firewall but I wanted to exclude any possibilities. And low and behold, both telnetting from my local machine as my dev server to ports 4016 and 4018 of my azurewebsites.net url worked.
Are there any other solutions for this bug? Since debugging locally is not an option (sharepoint provider hosted app for project online) this is very inconvenient.
Thanks,
UPDATE: Deploying the site as a cloud service works, and so does remote debugging them. However, we would like to stay with azure web sites for now..
I know this is a duplicate of Azure Remote Debugging: Failed to enable remote debuggingException from HRESULT: 0x89710023; but none of the solutions there or on twitter were of any use.
Check out Azure Remote Debugging: Failed to enable remote debuggingException from HRESULT: 0x89710023
I think this has to do with blocked ports 4016 and 4018

Error TF31004 connecting VS2012 to TFS

I am trying to setup a new connection to TFS with VS2012. Early on I was able to add my TFS server and, using the Microsoft Git Provider, clone a copy of the remote repository from within Visual Studio. Later, as I was fiddling with things in Team Explorer trying to find the branch I wanted to use, something broke. My local repository remains, but my connection to the remote repository was somehow corrupted, as evidenced with this error:
TF31004: Unexpected error encountered while connecting to Team Foundation Server at http: //my.server.com:8080/tfs. Wait a few minutes and try again. If the problem persists, contact the server administrator ok help
Things I have tried to resolve this:
Wait and try again (as the error message suggested).
Restart Visual Studio.
Reboot my machine.
Reboot TFS server.
Use system restore to revert back before I installed msysgit and Microsoft Git Provider, or had attempted to connect to the TFS server.
Review the MSDN help for the error (see below).
Search Stack Overflow (found one other related issue but did not seem to apply).
Tried devenv /ResetSkipPkgs
Tried devenv /setup
Re-install Team Explorer for VS2012.
Clear IE cookies (per this post).
Clear TFS caches (per this post).
The help page offers these tidbits, but none of them seem likely given that I had, as I said, the connection working at one point:
The version of Team Foundation running on the local computer does not match the version running on the Team Foundation Server server {name}.
The server returned HTML content instead of XML content.
The required Web service on the server could not be found.
Any ideas would be appreciated!
I have had an exactly the same problem.
My solution was to clear all the credentials in the Windows Vault (Credential Manager residing in the Control Panel).
I have no idea why the credentials did get messed up.

Resources