Tuesday, March 4, 2014

View SharePoint Deployment progress

There are many instances where our team would deploy the SharePoint solutions through management shell and then opens the Central Administration in the browser to see the deployment progress.
It's much easier to just write a one liner to see the status instead.

Get-SPSolution SampleSolution | Select Last* | format-list

Friday, April 27, 2012

The Journey continues

It feels that every few seasons, I get the itch to blog again.  With the new job that I started at Sogeti USA, I think this is a great time to restart.  It did not take the company long to throw me into a rather complex development project.  In fact, that complexity is mostly due to SharePoint 2010 platform on which we have to deliver our product.  Therefore, I will ultimately have to rant or provide various workarounds over the next few months as I encounter. 

So, the journey does continue …

Wednesday, November 10, 2010

Inserting Records with Identity column table

So, recently, I needed to insert some static data manually within the staging environment.  I wanted to align the identity column values to be in ascending order but if there are any typos causing my inserts to be rolled back, then the identity values will have gaps because rollback operation does not preserve the next value for identity.  Therefore, using DBCC CHECKIDENT ('<schema>.<tbl_name>', NORESEED), I can find the current value of the seed, while using DBCC CHECKIDENT ('<schema>.<tbl_name>', RESEED,<last_used_value>) sets the identity to the last value. 

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/">
    <PersonalizedHelloWorld xmlns="http://tempuri.org/">
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/">
    <PersonalizedHelloWorld xmlns="http://tempuri.org/">

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: