Sunday, March 7, 2010

I like to configure my VMWare Guests to manual startup/shutdown because I use the host for both as a management platform and a developer workstation.

To assist me with managing such environment, i use VI Tookit. Only 1.0 is compatible with VMWare Server 2.0, here. Install it on either x86 or amd64 box. Then, add a few lines of configuration to initialize the PSSnapin into your user’s PowerShell profile location:

Add-PSSnapin Vmware.VimAutomation.core
. "C:\Program Files (x86)\VMware\Infrastructure\VIToolkitForWindows\Scripts\Initialize-VIToolkitEnvironment.ps1"

Fire up PowerShell and you can do the following now

Connect-VIServer -Server "vmware_host" -Port 8333
get-vm sqldev2k8 | shutdown-vmguest

Tuesday, February 9, 2010

Keeping up with Microsoft

It seems that Microsoft releases new tools at an alarming rate. It feels like .Net 3.5 and Silverlight were just recently came to market, now Microsoft is at it again. Behold that .Net 4.0 and Visual Studio 2010 are just around the corner. Here is Scott Guthrie’s entry to confirm that, here.

From playing with Beta2 of VS 2010, I am highly looking forward to this release. They’ve made great strides at giving state of the art debugging, and visual design capabilities to developers.

The Beta2 and RC can both be installed side-by-side, so it’s time to play more with new stuff!!!

Thursday, February 4, 2010

Submitting Xml correctly into SOAP envelope

Over time, I became a bit comfortable for web services frameworks to take care of the serialization details. A few days ago, I had to deal with consuming the web service manually and quickly realized that i have not been below trenches in awhile.

The SOAP service has a string parameter which is in fact and xml fragment. Initially, I wrote the soap request in the following format:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <PersonalizedHelloWorld xmlns="http://tempuri.org/">
      <nameParameter><name>Roman</name></nameParameter>
    </PersonalizedHelloWorld>
  </soap:Body>
</soap:Envelope
Obviously, there is an issue with doing that. Can you spot it?

Well, you must use <![CDATA[]]> escaping syntax in the nameParameter element text. So the it should look like this:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <PersonalizedHelloWorld xmlns="http://tempuri.org/">
      <nameParameter><![CDATA[<name>Roman</name>]]></nameParameter>
    </PersonalizedHelloWorld>
  </soap:Body>
</soap:Envelope

Tuesday, January 12, 2010

Asp.Net Intrinsic properties

By default the System.Web.UI.Page exposes Session, Request, and Response properties.  However often you may want to access these properties outside of the Page context. The easiest way to do it is to use HttpContext.Current static property to obtain the current request’s HttpContext.  Thus, you can obtain a session variable like this:

HttpContext.Current.Session[“userid”].


Vote for two important CodePlex features

Eric Hexter, from MvcContrib project, has just asked the community to go and vote for a few issues with CodePlex. Here is his blog for reference, http://www.lostechies.com/blogs/hex/archive/2010/01/11/a-call-for-help-vote-for-my-codeplex-issues.aspx. Go Vote!

Monday, November 16, 2009

Windows Management Framework was released!

I always like playing with management tools for windows since dos days.  I think the release of Windows Management Framework at the end of October is truly the next step in Microsoft console/command-line tooling revolution.  Thank you, Jeffrey Snover.

Thursday, October 29, 2009

Web Goat – Interesting way to learn security on the Web.

As I deal more and more with web in my daily life, I realized that web security is a very intricate subject and tough to learn as well. The next iteration of CodeCamp is in town in a week, so I will have a chance to check out Web Goat. Due to time constraints, I wont be able to research beforehand, so it’s exciting to learn about something completely new.