• Quick C# method to validate a Citrix XenServer login

    Below is a quick C# method for validating a XenServer API login, give the server name/IP address, username and password using the XenServer .Net SDK. If you need the XenServer .NET SDK you can get it from the nuget.org package system within visual studio by searching for XenServer or by clicking on the direct link 400: Invalid request
  • Setting Content-Type header for an HTTP Post in Win8 Store App

    <In a recent project I was playing around with a Windows 8 Store app (formally known as Metro) and needed to POST some info to an REST based endpoint. The issue was I needed to set the Content-Type header to application/json to the API knew how to serialize the incoming data. Having not used the HttpClient object recently it took a little research to find how to set the Content-Type header. Its turns out this is pretty easy. Basically every HttpContent object has a .Headers property, which contains a property for most of the popular https headers, Content-Type being the... [Read More]
  • HOW TO- Convert .pem file to a .der file with OpenSSL

    Recently I have the need to convert an SSL cert I retrieved from a Citrix NetScaler device from the native format, .pem, into a format that was more digestible to Windows Server. In order to do this you’ll need the OpenSSL library for windows. You can find it at http://slproweb.com/products/Win32OpenSSL.html Once you have it installed, make sure you run the following command to setup the config file in your command prompt. Remember to replace the [openssl install directory] with the location you installed OpenSSL “set OPENSSL_CONF=c:[openssl install directory]binopenssl.cfg” Once you have all that set you can run the following command... [Read More]
  • HOW TO- Binding IIS Express to an any IP address–Not Only localhost

    By default, IIS Express only allows binds to localhost on a dynamically configured port. If you would like to have IIS Express bind to anything other than local host (say for things like testing an API service from a mobile device) you’ll have to modify the IIS Express config file. If you look in the following location “C:\Users[USER]\Documents\IISExpress\config” you will see a file named applicationhost.config. This is the file you need to modify. If you open the file applicationhost.config in your favorite editor and look for the specific site you want to enable IP http access on. It’ll look something... [Read More]
  • Installing DotNetOpenAuth 3.4 from NuGet breaks debugging in IIS Express

    During a coding session recently, I needed to use the DotNetOptnAuth project to perform some authentication to a vary of outside services. I know that this library is available on the nuget package systems so I added the reference via nuget in Visual Studio. Now, assuming you are the default Visual Studio Development Server and you run your project right away you’ll have a false sense of security that your project is all set and ready to go, like the following. All looks good right? If you dig a little deeper, and set your project to use IIS express, like... [Read More]