Uncategorized
File Hashing Is Built Into Windows
I always used to download the md5sum.exe and sha1sum.exe files when I needed to generate a file’s hash in Windows. I just discovered that certutil.exe, included with Windows 7 and Windows Server 2008 R2, will do this for you (I’m not sure if it was included in earlier versions of Windows). Just use the following commands to generate the appropriate hash:
MD5: certutil -hashfile C:\Windows\notepad.exe MD5
SHA1: certutil -hashfile C:\Windows\notepad.exe SHA1
SHA256: certutil -hashfile C:\Windows\notepad.exe SHA256
SHA512: certutil -hashfile C:\Windows\notepad.exe SHA512
Note that it defaults to SHA1 if you do not specify a hashing algorithm.
Visual Studio 2010 / SP1 / Windows SDK Install Order
When you plan to install the Windows 7/2008 R2 SDK, the SDK needs to be installed before VS2010 SP1. Here is the recommended install order:
1. Visual Studio 2010
2. Windows SDK 7.1
3. Visual Studio 2010 SP1
4. Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1
Here is the link to the blog post about this: http://blogs.msdn.com/b/vcblog/archive/2011/03/31/10148110.aspx
Using EF 4.1 Code First without SQL Express
I began following Julie Lerman’s excellent tutorials on getting started with Entity Framework (EF) version 4.1 and the Code First technique of generated databases on the MSDN web site. However, the defaults for Code First expect you to have SQL Server Express installed for the examples to work. I was able to get EF Code First to work with SQL Server (not Express) by adding the following connection string to my web.config file:
<add name="BlogContext" connectionString="Server=.;Database=BlogContext.mdf;Integrated Security=SSPI;" providerName="System.Data.SqlClient" />
Just make sure that the name, e.g. BlogContext, matches the name of the class derived from DbContext. Note that you will also likely need to replace the “.” in “Server=.” with whatever your server name is. The “.” is just a reference to the SQL Server running on your local machine.
Rob
Where TFS Connections Are Stored
I am migrating from one dev machine to another and wanted to export/import my TFS connections for Visual Studio 2010. It turns out they are all stored in the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\Instances
If you’re looking for the Visual Studio 2008 entries, they are located here:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Servers
Rob
XP SP3 cannot connect to Vista Ult SP1
I could not get our Windows XP SP3 machine to connect to our Vista SP1 “server” machine. I found the solution at:
Solution: The XP machine’s Local Security Policy had to be changed to enforce NTLMv2.
The user’s problem was described as follows:
I upgraded Vista Ultimate to SP1 today and after the update, I can no longer see the folder and device shares that used to be visible to another computer running XP SP2. If I try NET VIEW from the XP computer, I get “System error 58 has occurred” and no information. Priot to the upgrade, all of the network shares were visible to my XP computers. I also upgraded a laptop computer running Vista Home Premium to SP1, and it has no problem seeing the shares across the network, so the problem appears to be particular to either XP or maybe any non-Vista OS. Ideas?
And this was the solution:
I’ve solved the problem of not being able to see network shares on my Vista machine from an XP machine after installing Vista SP1. The problem was authentication level for LAN Manager. Vista defaults to NTLMv2, and my Vista machine only allowed that level. My XP machine was set for LM & NTLM, but did not deal with NTLMv2. I solved the problem by going into Local Security Policy on both machines and changing the Network security: LAN Manager authentication level to “Send LM & NTLM – use NTLMv2 session security if negotiated” on both. I had to reboot to have the change take effect, and the problem was eliminated.