Link to home
Create AccountLog in
Avatar of greddin
greddinFlag for United States of America

asked on

TFS - Downloaded file is corrupt error

Other developers can't get the latest version of files I've committed to TFS.  They get an error that says the file is corrupt.  

Anyone run into this before or have any suggestions?

Thank you.
Avatar of AndyAinscow
Flag of Switzerland image

Can you get them back in their correct format or are the files also corrupt for you after downloading?
Avatar of greddin


Yes, it looks like I have no trouble getting the latest version of a file that I've previously committed to TFS.
I just ran into this problem.  The FipsAlgorithmPolicy was set to 1 on my workstation, but set to 0 on other developer workstations (I had changed it to test some settings in a more production-like environment).  Visual Studio 2012 and newer store a hash of checked-in files and use a different hash algorithm when FipsAlgorithmPolicy is set to 1.  I changed it back to 0, rebooted, made a small change to the affected file and checked it in.  Everyone else could then get the latest version.
Avatar of greddin


Thank you. Is the FlipsAlgorithmPolicy something changed in the registry or some where in Visual Studio?
The FipsAlgorithmPolicy setting is stored in the Registry.  There are a few ways to change it.

In Windows Server 2003 and Windows XP the registry key is HKLM\System\CurrentControlSet\Control\Lsa.  Add a DWORD (32-bit) value named "FIPSAlgorithmPolicy" and set it to 1 for Enabled or 0 for Disabled.

In Windows Server 2008 (and newer) and Windows Vista (and newer) the registry key is HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy.  Add a DWORD (32-bit) value named "Enabled" and set it to 1 to enable FIPS compliance or 0 to disable FIPS compliance.

You can also use the Local Security Policy console app in Administrative Tools to turn this setting on or off.  Navigate to Local Policies, Security Options, and either enable or disable the "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing" policy.
Avatar of greddin


Ok, On my workstation I already have a FipsAlgorithmPolicy. It's got an Enabled and it's set to a value of 1.

So just to confirm... Does them suggest I need to try setting to value of 0, reboot and try committing again?

Thanks. This seems promising for a nagging problem I've had for a long time now.
Avatar of David Davidson
David Davidson
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of greddin


Thank you David. I wish I could give you more points! This problem is plagued me for a long time now.  Setting the FipsAlgorithmPolicy to 0 fixed our problem.  The other developers all had theirs set to 0.  I don't know how mine was 1.

Thanks again,