Saturday, February 02, 2013

Ad-Hoc WiFi in Windows 7

The behavior of Ad-Hoc WiFi in Windows 7:

In order to be able to share your internet connection via WiFi you must create the Ad-Hoc connection from a User account with administrator privileges. Only then you get the "Turn On Internet Connection Sharing" Option towards the end.

In order to be able to share files - you must use a secure WiFi connection and not 'No Authentication' i.e. Open with WEP. Only then will you be able to change the Network to a Private/Home network from Public Network.

Friday, February 01, 2013

Solving: "The certificate's CN name does not match the passed value"

In mail clients like Windows Mail - if you get the error: "The certificate's CN name does not match the passed value", it is because you are connecting to a mail server whose SSL Certificate does not match its exact fully qualified domain name (FQDN).

This could be because of the following:

  1. The server address may be missing a single character.
    e.g. mail.example.com. against mail.example.com [ notice the trailing period]

    Solution: add the missing period '.'
  2. Perhaps your mail server is simply redirected to the actual mail server via a CName DNS Record.
    e.g. mail.example.com ==> server1.mailbox_example.com

    To check this, you can examine the DNS details for interconnecting server (here mail.example.com) using a lookup service like MXToolBox CName lookup.

    You may also check the server certificate to find out the server to which the certificate has been issued to.
    You may use OpenSSL Client also with the following syntax:
    OpenSSL s_client -connect <RemoteHost>:<RemotePort>
    -showcerts


    Solution: Connect directly to the final server and not the redirected CName address.

Tuesday, January 08, 2013

Load LinkedIn API asynchronously


  1. Use the async version of the API
    http://platform.linkedin.com/in.js?async=true
  2. Load the library asynchronously
    <script type="text/javascript">
    (function()
    {
    var e = document.createElement('script');
    e.type = 'text/javascript';
    e.async = false;
    e.src = 'http://platform.linkedin.com/in.js?async=true';
    e.onload = function(){IN.init() };
    var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(e, s);
    })();
    </script>
You may provide additional parameters like  "onLoad" -callback function & APIKey
in the call to IN.init({Param1:Value1, Param2:Value2})

Friday, January 04, 2013

"ReadKey Exception" trying to pause PowerShell Script

If you use $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") to pause in a PowerShell script, you get the following error message:
Exception calling "ReadKey" with "1" argument(s): "The method or operation is not implemented."

Reason: You are probably running the PowerShell script in the PowerShell ISE thus the related IO sub-system is unavailable.

Solution: Run the script directly and not from the PowerShell - ISE, it will work as expected.