Monthly Archives: October 2016

Oracle ODBC with Instant Client

Posted on by 0 comment

Sometimes we don’t want to have full client installed just for an ODBC connection to Oracle Database, so I had a try with Oracle Instant Client.

Download & install required packages

  • Instant Client Package – Basic
  • Instant Client Package – ODBC
  • You can download either Instant Client for Microsoft Windows (32-bit) or Instant Client for Microsoft Windows (64-bit) based on your preference.

    After we have the packages, unzip them into a directory, all the files should be in same directory. and then run odbc_install.exe with admin privilege. Once you have the successfully installed message, the ODBC driver should appear in control panel – ODBC Data sources.


  • Configure TNSNAMES.ORA
  • TNSNAMES file format would be

  • Set Environment Variable
  • Add a new System variable called TNS_ADMIN, and enter the path where your TNSNAMES.ORA resides as the value

  • Test the ODBC
  • At this point, we should be able to see the TNS name in ODBC setup, and successfully connect to DB after enter username and password.

    Category: ODBC, Oracle

    Jira OAuth authentication using DotNetAuth

    Posted on by 8 comments

    In this post, we will try to connect to Jira with oAuth authentication in DotNet, I did some research, and mainly followed the instructions on Is there any JIRA OAuth implementation example in .NET and JIRA REST API Example – OAuth authentication

    Generate self-signed certificate

    OpenSSL is used for generating the certificate,

    public.pem will be required in public key field of your application in Jira application links
    private.pcks8 will be required in the client (variable consumerSecret)

    Configuring Jira

    First we need to go to Jira administration – application to register a new application link. Detailed step is the same as the step 1 of the JIRA REST API Example – OAuth authentication.

    Using PKCS8 format private key in C#

    Jira currently is using RSA-SHA1 as the aAuth signing type. Class RSACryptoServiceProvider will be used for the sign, but it only supports xml format key. So we need to convert the PKCS8 format to supported XML format, for which opensslkey is used here.(opensslkey can be downloaded from here)

    Sample Code

    Below is the code, I put everything together. After the successful authentication, we should receive accessToken and accessTokenSecret; and send oAuth authenticated request with those information.

    Category: C#, Jira, OAuth

    Selenium locator extension

    Posted on by 0 comment

    In Selenium, there are multiple locator functions, such as

    • By.CssSelector
    • By.XPath
    • By.Id
    • By.Name
    • ……

    In my case, I would like to use different format, which I can call one method instead of so many, it would be easier to store the locator information somewhere else. The locator format would be ByMethod = selector to Find, for example:


    So an extension method was created for this, here is the code snippet.

    Category: C#, Framework, Selenium