Virtual Images and NEWSID

March 14, 2009

Quick way to generate newsid’s for virtual images (Virtual Server 2005 R2). I really need to upgrade my home PC to support Hyper-V. I love the self-provisioning! Instead its the basics of Virtual Server. I mistaking thought I was using a sysprep clone when I was making my sharepoint box. Thought everything was fine until I tried to join the Virtualized Active Directory Domain.

When I did this I got the nice “failed to join active directory” – “SID blah blah blah”.

Looked around a bit and found a command line application from microsoft to re-create a new SID for the cloned image so that I could rename my virtual and then join the domain successfully.

http://technet.microsoft.com/en-us/sysinternals/bb897418.aspx

It worked out to be pretty simple. Next time I’ll be sure to grab the sysprep version of my Windows 2003 R2 server.

Annoying Locked DLLs in ASP.NET Visual Studio 2008

January 27, 2009

Modify your web application to have a pre-build action like below and this fixes that.

if exist "$(TargetPath).locked" del "$(TargetPath).locked"
if not exist "$(TargetPath).locked" if exist "$(TargetPath)" move "$(TargetPath)" "$(TargetPath).locked"

If this does happen to you, you may want to find out if you disabled shadow copy assemblies in your web.config.

SQL Management Studio over VPN with NTLM Credentials

January 20, 2009

Anyone familiar with the following message when using SQL management studio?

"Login failed for user ''. The user is not associated with a trusted SQL connection."

The work for my client requires me to VPN into their backbone. Works great except when I try to access sql databases on my home pc. In the past I have had to remote desktop into the environment or use SQL credentials because I could not simply use windows credentials (I even tried run-as user).

With a bit of googling on my sick day (bad sushi) I found the below command. Goodbye not authorized errors! Hello toilet!

x64 Bit Version

runas /netonly /user:YOURDOMAIN\YOURUSERNAME "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

x32 Bit Version

runas /netonly /user:YOURDOMAIN\YOURUSERNAME "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"