§ Tips & Tricks
Wednesday, November 17, 2010
A pitch to move to a virtual machine based development environment
I recently moved to a VM (Virtual Machine) based development work environment and wanted to share my experience with others and provide some tips for getting started.
I’m sure you’re probably asking yourself, what is a VM based development environment? Well simply put the idea is to do use VM software such as; VMWare Workstation, Oracle VirtualBox, Microsoft Virtual PC to create one or more virtual computers in which you install and use your development tools.
There are many reasons you might want to move to a VM based development environment.
Experimentation
My primary development environment is setup using Windows 7 Ultimate (x64) with Visual Studio 2010 Pro and SQL Server 2008 R2 (x64). What if I decide I want to try doing some development using the free and open source MySQL database? Well I guess I could install all that on my machine and hope it doesn’t have any compatibility issues or screws up my computer. However with VMs I can easily clone my development environment and install MySQL safely in this copy. I can verify that it causes no issues and develop within that new system for whatever projects I want to use MySQL for. If I get bored or decide I don’t want to use MySQL it won’t hurt one bit to just delete the entire VM.
Portability
Do you use many different computers? I know I sure do! I have my work PC, my home desktop and my laptop. If I’m using VMs to host my development environment I can keep the VM on an external USB drive and as long as I can install the VM software on the computer I’m at I can start up and use my development environment any ware, any time.
Testing
Besides just installing your development tools in a VM you can setup separate environments to test your software in different platforms. Want to see how your app works on Windows 2000, XP, Vista, Linux? Not a problem when you can setup multiple installs inside separate VMs. Plus most VM software allows you to setup what are called snapshots. Snapshots allow you to save the state of a VM and rollback changes at will. I won’t go into details about all the power that provides but it’s something you should look into because it is a great feature!
Security & Privacy
Are you a consultant that works for many different clients? I’m sure at some point you will end up working with a client that goes overboard with security. You know the type, they require you use a special VPN client and it won’t let you log into the VPN if you don’t have a specific required anti-virus software. The power of virtual machines allows you to make a complete copy of your development VM and then you can install whatever required software you need for that client.
Plus as an added benefit you can tell your clients that the code you work on will be secure and private in a dedicated development environment that no one but you has access to and will not be shared with any of your other clients. Most software a company has is private and very valuable. I’m willing to bet letting a client know that the all their code, documents and files will be kept in secure and private environment will go a long way to showing you are very professional.
Freedom
This one I admit probably isn’t exactly the most upstanding of reasons but I’m not going to lie and say it’s not a valid one I think about.
Are you stuck at work using Windows XP and Visual Studio 2005? Well there’s a good chance your work PC is probably also a horribly slow hunk of junk too. If however you have some decent hardware you could setup a VM at work so you can run your favorite OS and dev tools. No one has to know, we’ll keep it just between you and me. I promise!
Of course, unless you are a one man dev shop, you need to be good and make sure the work you do is still compatible with other developers using old tools. Some might call it job security but I call it being an inconsiderate ass if you develop software that can only be recreated with your toolset.
Hopefully this short post has brought some new ideas about Virtual Machines and their benefits for developers. Take a look at one of the free VM offerings, install and start playing around.
Best of luck!
Monday, March 01, 2010
Backing Up Windows Shares & Settings
If you ever have a need to save a windows servers file shares & settings here’s how to do that. This is handy if you happen to be transitioning to a new file server and you have a lot of shares that need to be transferred. You could always do it by hand but this way will save you a lot of time!
Open up your registry on the server and navigate to:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares]
Right click on the Shares folder and choose export
You will now have a .reg file that you can copy and install on the new server and have all the file shares and security settings ready to go.
One note to remember is this only works if you setup the file shares identically on the new server. You have to keep the drive letters and folders matching the old server.
Saturday, January 28, 2006
Could not create a Disk Cache Sub-directory for the Application Pool
Error: The Template Persistent Cache initialization failed for Application Pool ‘DefaultAppPool’ because of the following error: Could not create a Disk Cache Sub-directory for the Application Pool. The data may have additional error codes..
If you happen to see this error pop up on your Windows Server 2003 system here’s how to fix it.
Basically, the problem is there are two user groups (IIS_WPG and NETWORK SERVICE) that don’t have permissions set on the following three folders:
%systemroot%\Help\IISHelp\Common
%systemroot%\System32\Inetsrv\ASP Compiled Templates
%systemroot%\IIS Temporary Compressed Files
%systemroot% is usually C:\windows or C:\winnt by the way!
For “%systemroot%\Help\IISHelp\Common ” give both groups; Read and Execute, List Folder Contents, and Read permissions.
For “%systemroot%\System32\Inetsrv\ASP Compiled Templates” and “%systemroot%\IIS Temporary Compressed Files” give both groups full control.
then after that you’ll have to restart IIS.
1. Click Start, click Run, type Services.msc, and then click OK.
2. Right-click IIS Admin, and then click Restart.
That should fix that silly problem!
Wednesday, July 20, 2005
Fixing SQLAgent is not allowed to run error
This is for anyone running Sharepoint on Microsoft Windows Server with MS-SQL and you are getting an error along the lines of “SQLAgent is not allowed to run”.
All you have to do is make a small registry change. Navigate to:
“HKEY_LOCAL_MACHINE/ SOFTWARE/ MICROSOFT/ MICROSOFT SQL SERVER/ SHAREPOINT/ SQLSERVERAGENT”
Look for the key “GUID” and delete it.
the SQLAgent service should now start up without problems.
I had a heck of a time figuring out this problem but after some searching this seemed to do the trick.
Cheers!
Sunday, May 22, 2005
How to delete an undeletable Web Service Extension in IIS 6.0 on Windows Server 2003
Here’s a quick tip for anyone trying to delete a Web Service Extension in IIS 6.0 on Windows Server 2003. As you know there are some extensions that don’t have the options of being deleted.
Here’s how to change that.
First you’ll need to download the Internet Information Services (IIS) 6.0 Resource Kit Tools from Microsoft.
You really only need to install the Metabase Explorer but feel free to do a full install as all the tools can be handy to have.
Start up the Metabase Explorer and navigate to to SERVER(local) / LM / W3SVC. Look for the key named “WebSvcExtRestrictionList”. On my system it as an ID of 2168 but it might be different on yours.
Double click on the “WebSvcExtRestrictionList” key and a window will open with all the extensions.
Each line’s format follows this basic format (separate by commas):
Status (0 Prohibited, 1 Allowed)
File Name
Delete Flag (0 Can’t Delete, 1 Can Delete)
Service Extension Short Name
Service Extension Display Name
Just click on the extension you want to delete and set that delete flag to 1. Click OK and exit the Metabase Explorer. Open up IIS Manager or at least refresh the Web Service Extensions window. You should now be able to delete the Extension you want.