How-To: Connecting to Internap’s XIPCloud

I didn’t find straight-forward instructions for using .NET with XIPCloud on Internap’s portal, so I’ll pass along what I learned.  This article assumes you are using Visual Studio 2010 and that you have already acquired an Internap account for XIPCloud.

Step-by-Step

  1. Acquire & Build OpenStack C# SDK
  1. Download the Rackspace C# library for OpenStack. Go to the Rackspace / csharp-cloud page on GitHub, push the Downloads button and click on the zip file to download (this article is based on csharp-cloudfiles-1.5.0.0)
  2. Extract the zip files into your preferred location (where you typically keep external or 3rd party code or assemblies)
  3. Using Visual Studio open the solution file, com.mosso.cloudfiles.sln, from the extracted files location.
  4. Build the solution – I batch built all configs.  Assuming the builds completed successfully, you now have the OpenStack C# assemblies in <Sln file location>csharp-cloudfiles-1.5.0.0com.mosso.cloudfilesbin[Debug|Release]
  5. Close the solution
  1. Create A OpenStack Client Application
    1. Create a new .NET application – this article uses a C# console application.
    2. Right-click the References folder under your new project and select Add Reference…
    3. Push the Browse button, navigate to the csharp-cloudfiles assemblies (see #4 above), select com.mosso.cloudfiles.dll and log4net.dll, push the Add button and then Close
    4. Now, change Program.cs to:

using System;

using com.mosso.cloudfiles;

using com.mosso.cloudfiles.domain;

namespace XIPCloudDemo

{

class Program

{

static void Main(string[] args)

{

Uri uriAuth = new Uri(“https://auth.storage.santa-clara.internapcloud.net/v1.0”);

string userName = “<your user name goes here>”;

string apiKey = “<your user password goes here>”;

UserCredentials userCreds = new UserCredentials(uriAuth, userName, apiKey, string.Empty, string.Empty);

Connection connection = new Connection(userCreds);

/* Add more code here.  For example, to create a container and copy a file to it…

connection.CreateContainer(containerName);

connection.PutStorageItem(containerName, localFilePath);

*/

}

}

}

Now you’re ready to build and run your app!  If you have trouble, use Fiddler to diagnose what’s going across in requests, headers, responses, etc.

Somewhere on Internap’s portal or in the developer guide I found the note about using your portal username (email address) and password for X-Auth-User and X-Auth-Key.  Hopefully they’ll provide actual API keys like all the other storage providers do.

I hope this helped you get started.  Feel free to leave a comment if you have any questions.

2 thoughts on “How-To: Connecting to Internap’s XIPCloud”

  1. Thank you for taking the time to provide feedback on your experience accessing Internap XIPCloud Storage and your suggestions on how we can improve. We will be sure to work to address the issues you raised so we can make this the best product possible. If you have more feedback you would like to share, feel free to contact me.

    David Lorti
    Internap Network Services Corporation

This site uses Akismet to reduce spam. Learn how your comment data is processed.