Vmware and Time Problems

ESXi server has issues syncing time across all virtual machines running Windows Server 2012. To remedy, set operating systems to manually sync time against external NTP servers.

 w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:manual /update


Dell Monitor Stuck in Power Save Mode

“Throughout the last six months I’ve come across computers at my work with monitors that just wont display at all. Instead I get the message, “Monitor is in power save mode, activate using PC.” Now this is happening when the PC is booted and running. Beyond turning on the PC’s power, how can you activate the monitor? Is this message an indication of some other problem?”

As someone who routinely runs into this issue, I’ve also been wondering about this for the last few months. I bought an old Dell E176 on Ebay for console access. Recently when I needed it for upgrading a few computers, this became a issue. After reading through the forum posts, it’s clear that Dell monitors have problems with there memory settings (in the monitor’s hardware, not the PC) and coming out of power save mode.


Unplug the power cord for the monitor from the wall and wait for about 10 seconds, then replug-in the monitor. This should force the monitor to come out of sleep mode and re-calibrate it’s settings. Unplugging the VGA/DVI cable doesn’t do this.

Afterwards, set your desktop power settings to never sleep the monitor. Otherwise, do the aforementioned again.


ASP.NET Webforms, WebMethod, JSON, and Jquery

Using JSON Serializers such as Newtonsoft’s JSON library is not needed in later versions of ASP.NET.

Instead, if you’re sending a JSON object via AJAX, the webforms framework will attempt to automatically deserialize the object into the type passed into the parameter and serialize the object when it is being returned to the page.


ASPX Page – Binding a button that submits a JSON Object

<script type="text/javascript">
    $(document).ready(function () {

        $('#<%=ButtonSubmit.ClientID%>').click(function () {
            var InputObj = {
                "InputObj": {
                    "IsAvailable": 0,
                    "Input": $('#<%=TextInput.ClientID%>').val()

                type: 'POST',
                url: '/Templates/UI/Views/MobileLocator.aspx/CheckZip',
                data: JSON.stringify(InputObj),
                contentType: 'application/json;charset=utf-8',
                dataType: 'json',
                async: true,
                cache: false,
                success: function (obj) {
                    if (obj.d.IsAvailable === '1') {                       
                    else {


            return false;

CodeBehind – Static WebMethod

        public static FormInputObj CheckZip(FormInputObj InputObj)
                if (InputObj != null && !string.IsNullOrEmpty(InputObj.Input))
                    bool iIsAvailable = false;
                    InputObj.IsAvailable = iIsAvailable ? "1" : "0";

                    return InputObj;

            return new FormInputObj { IsAvailable = "0" };

    public class FormInputObj
        public string Input { get; set; }        
        public string IsAvailable { get; set; }

The only things to note are the following:

When serializing the object into JSON format using Jquery, make sure the parameter’s name is the parent object. Example:

var InputObj = {
                "InputObj": {
                    "IsAvailable": 0,
                    "Input": $('#<%=TextInput.ClientID%>').val()

The “InputObj” matches the parameter name in the codebehind. This is needed or else ASP.NET will return an error. You must also call


when creating the parameters for data key in the $.ajax method.

When reading the returned object in the Jquery success event, you must reference the ‘.d’ in the returned object before calling the property of the strongly typed object.

 if (obj.d.IsAvailable === '1')

Most Q&A topics on Stackoverflow regarding this are outdated. Ignore any articles circa 2013 or earlier regarding this topic.



Moga Pro Controller and Android

  • When turning the power on, use HID mode or Mode B. This will emulate keyboard mode.
  • Download the Universal Moga Driver
  • Pair with Bluetooth
  • Create a virtual keyboard profile and map the directional keys
  • When using SNES emulator, make sure you map the keys to the same buttons as the game pad configuration from the Moga Driver Screen.

Zimbra: Update MTA Server IP Address

Recently my VPS provider changed the IP address for the server. On top of updating the hosts file, you also need to update the IP address used for the MTA.

In the Zimbra Web Admin Console, Configure -> Servers -> Click on the server in the right pane -> MTA -> MTA Trusted Networks

Razor Generator – Generated class name is different than file name

I’ve been using Razor Templates to generate text blobs. For some reason, my razor templates stopped generating namespaces based on the file path and added underscores into the class name. I did the following to fix this issue.

Add this to the top of the cshtml file:

GeneratePrettyNames: true
GenerateAbsolutePathLinePragmas: true

So the top of the file might look similar to this declaration:

@* Generator : Template TypeVisibility : Internal GeneratePrettyNames: true
    GenerateAbsolutePathLinePragmas: true *@

Reference:  Codeplex Link

Visual Studio Will Not Start

After installing an extension, I sometimes get the following error

A problem occurred when loading the Microsoft Visual Studio menu. To fix this problem, run 'devenv.exe /resetsettings' from the command prompt. Note: this command resets your environment settings.

Open up Developer Command Prompt and try the following:

devenv /setup

and then start Visual Studio. If you still get an error, try starting it from the Administrator Command Prompt with the command



Reference: Stackoverflow