I am attempting to make use of the WCF Relaxation Starter Package using the RightScale's Login API which appears fairly easy to use.

Edit - Here is a blog entry I authored on using Powershell to eat the API.

Edit - Produced a normal .Internet wrapper for that RightScale API - NRightAPI

It's exactly as easy as it appears while using the CURL. To ensure that me to acquire a login cookie all I have to do is:

curl -v -c rightcookie -u username:password "https://my.rightscale.com/api/acct/accountid/login?api_version=1."

And That I get the following cookie:

HTTP/1.1 204 No Content Date: Comes to an end, 25
12 , 2009 12:29:24 GMT Server: Mongrel 1.1.3 Status: 204 No Content X-Runtime: .06121
Content-Type: text/html charset=utf-8
Content-Length:
Cache-Control: no-cache
Added cookie _session_id="488a8d9493579b9473fbcfb94b3a7b8e5e3" for domain my.rightscale.com, path /, expire
Set-Cookie: _session_id=488a8d9493579b9473fbcfb94b3a7b8e5e3 path=/ secure Vary: Accept-Encoding

However, after i make use of the following C# code:

HttpClient http = new HttpClient("https://my.rightscale.com/api/accountid/login?api_version=1.")
http.TransportSettings.UseDefaultCredentials = false
http.TransportSettings.MaximumAutomaticRedirections =
http.TransportSettings.Qualifications = new NetworkCredential("username", "password")
Console.WriteLine(http.Get().Content.ReadAsString())

Rather than a HTTP 204, I recieve a redirect:

You're being <a> href="https://my.rightscale.com/dashboard">redirected <a>

How do you obtain the WCF Relaxation starter package dealing with the RighScale API ?

I desired to include a "Authorization: Fundamental " header to my request.

In towards the initial code I'd published:

HttpClient http = new HttpClient("https://my.rightscale.com/api/acct/accountid/login?api_version=1.")
http.TransportSettings.UseDefaultCredentials = false
http.TransportSettings.MaximumAutomaticRedirections =
http.TransportSettings.Qualifications = new NetworkCredential("username", "password")

I have to add the Authorization header together with the Relaxation request using the username/password the following:

byte[] authbytes = Encoding.ASCII.GetBytes(string.Concat("username",":", "password"))
string base64 = Convert.ToBase64String(authbytes)
string authorization = string.Concat("Authorization: Fundamental ", base64)
http.DefaultHeaders.Add(authorization)

After which after i made the request:

Console.WriteLine(http.Get().Content.ReadAsString())

I received the HTTP 204 together with the session cookie I had been searching for. So what can I only say, Fiddler rocks ! :) !