jump to navigation

Looking at my web role service with the Azure MMC snap-in November 16, 2010

Posted by Toby77006 in Azure certificates, Azure MMC snap-in.
add a comment

As usual, I don’t FULLY understand what I am doing. I have been using the Azure MMC snap-in successfully for some time to upload tables and blogs, but now I have a web role running, I wanted to use the MMC to control it, because it’s a more familiar UI than windows.azure.net.

OK. I am trying to connect. I know my deployment ID. It says I have no certificates. Mr. Google leads me to an excellent blog by David Aiken (the only thing he doesn’t mention is that you must Run As Administrator, or you won’t see “Server Certificates” in step 3). I create and upload a .cer file, whatever that is. Step 16: Done! Well, no! MMC still doesn’t see a certificate. I sign out and sign back on to windows.azure.net. Now it wants a .pfx file, whatever that is. Mr. Google finds me another excellent blog on pentaware. I upload a .pfx file. MMC still doesn’t see a certificate. Stumbling around, I notice that when I look at the certificate details in Certificate Manager, I see a colored message about a private key. The same dialog box in the MMC does not have that message. More stumbling around. What works is to copy the certificate from “Trusted Root Certificates” to “Personal” in Certificate Manager. MMC is happy! I am happy!

Of course, I still can’t do what I really want to do, which is to connect my Silverlight program to the web role. But I’m close — more later.



SharedKey Authorization Header in VB.NET October 26, 2010

Posted by Toby77006 in Azure TableStorage.
add a comment

I couldn’t understand why my VB program was getting 403 Forbidden when the Azure Management Console could access my table just fine. Stupid coding problem, I was following C# examples that all include statements like this:

string messagetoSign = String.Format(“{0}\n/{1}/{2}”, gmtDate, accountName, tableName);

The VB equivalent is

Dim messagetoSign = String.Format(“{0}{3}/{1}/{2}”, gmtDate, accountName, tableName, Chr(10))

You would think it wanted Environment.NewLine but no, it just wants a line-feed.

Making my first collection (start here) August 3, 2010

Posted by Toby77006 in PivotViewer.
add a comment

My data was in a rather irregular Excel spreadsheet with about 3,000 rows and 20 columns. I discovered http://www.getpivot.com/developer-info/cmd-line-tools.aspx, which is very valuable. I first downloaded the command-line tool, but I couldn’t get the sample to work, which was discouraging. (I tested with a sample program from TimHeuer.com, just changed the collection name from dog breeds.) My policy throughout has been “just find something that works”. I had much better luck with the Excel add-in from the same site. I’d recommend to a beginner to start with “New Collection”, “Import Images” from the usual Sample Pictures library, and see what it does for you, then paste in your own data. “Quick Preview” didn’t work for me, probably because I lacked another Excel option, but “Publish Collection” worked (slowly), and the test ran, after a few obstacles, which I’ll list in the next post.

How my Silverlight PivotViewer demo was built August 3, 2010

Posted by Toby77006 in PivotViewer.
add a comment

This is an introduction to the next few posts. The demo should be found at http://houstoncip.blob.core.windows.net/cipcollection1/DFCPivotViewer.html  or failing that in my play area at http://www.nephmaster.com/Pivot/DFCPivotViewer.html. I’m not an expert (yet!). My purpose is to report my experience of what was easy and what wasn’t.

  1. I made a “collection” (quite a lot of stumbling about).
  2. I made a Silverlight host program (easy).
  3. I tested it in my play area on GoDaddy (found a few gotchas).
  4. I uploaded it to Windows Azure Blob Storage (more stumbling about).

Overall, after this experiment, I feel confident to take on a PivotViewer project as long as the quantities of data are small.

Transferring the work to Azure August 3, 2010

Posted by Toby77006 in PivotViewer.
add a comment

Although I had sample programs from the Azure Boot Camp that could have uploaded the collection to Azure, I wanted a tool, preferably a free one. First I downloaded CloudBerry. Couldn’t evaluate it, Norton Anti Virus killed the installation. I think the vendor has opened a ticket with Symantec. Next tried Gladinet. It uploaded 1,000 of my 9,000 files in 3 hours and then wanted money. I don’t think so! Then I discovered an MMC snap-in at http://code.msdn.microsoft.com/windowsazuremmc and that’s what I used. The UI is great and it’s promising, but it’s in a very Release 1.0 state. The documentation is lacking. There’s a very professional 15 min. video which told me everything except what I wanted to know, which was how to upload to a container. I succeeded at the second attempt, and probably all my problems were due to fat-fingering and not understanding what they expect me to do. What I learned:

  1. If menu items like “Upload BLOB” disappear, just X out and reload.
  2. View Details in the BLOB pane because you need to watch what it is doing to the full blob name. I had to put a slash in front of my /collection1.cmxl to get it to work, I don’t know why.
  3. Check the MIME type when you upload a single BLOB because it doesn’t know .xap or .cxml.
  4. Delete BLOB takes a long time because it causes a reload of the BLOB pane and it’s hard to tell when it has finished, so avoid it until you are doing a final cleanup.
  5. In fact, at first, I was often wondering what it was doing, until I realised I was supposed to monitoring the “Operations Queue”.
  6. It took about 50 minutes to upload my collection, which was only 20% of my real data. There is discussion in various places about how to do faster uploads. I have seen mention of a program called robocopy

I make a Silverlight host August 3, 2010

Posted by Toby77006 in PivotViewer.
add a comment

This was the easy part. I had downloaded the control at the beginning of all this from http://www.silverlight.net/learn/pivotviewer. You have to add references to 5 DLLS with names beginning System.Windows.Pivot, and make sure you have a namespace xmlns:pivot. If you get silly COM errors or “Child of another element” messages, just keep doing Build until they go away.

I chose to host the control in the regular TestPage.html rather than an aspx because I intended to locate it in Windows Azure Blob Storage. I created a simple header panel in xaml to sub for the “collection properties” which I grumbled about in my last post.

The only reason my program did not work first time was that I needed two very simple handlers for ItemDoubleClicked and LinkClicked events. Tim Heuer’s quickstart provided examples.

Not quite what I expected! August 3, 2010

Posted by Toby77006 in PivotViewer.
add a comment

I was ecstatic to see my collection come up in a sample program, but some details were not right.

  1. None of the items from the “Collection properties” Excel worksheet were laid out satisfactorily (logo, title, copyright message), but no big deal, I fixed that later in Silverlight.
  2. Some of my data did not appear in the filter panel even though I had checked the boxes correctly on the PivotCollection ribbon in Excel. I realised from looking at the .cxml file that the missing ones had a type of LongString rather than String, so I manually processed the .cxml. An expert (Jett) in the forum later told me that the tool generates LongString when the Excel column has WordWrap set. I think they need to reconsider that!
  3. I was disappointed that the Description field is not searchable. I would have to copy the exact same data into another column and check “Keyword Filtering” on that. Another time, I would be more careful about my choice of “Name”. For quickness, I had just taken the first few characters of the Description as the Name.
  4. I never did get multiple search values working. IMHO the tool did not work they way it should. See http://getsatisfaction.com/live_labs_pivot/topics/multiple_values_in_a_facet_not_working_like_i_expected

My collection resists publication… August 3, 2010

Posted by Toby77006 in PivotViewer.
add a comment

Nothing worked right away! Of course the Excel tool saved the collection in local storage. I suspected that the collection wanted to be on a website, which I later discovered is a known requirement. I put it up on GoDaddy, but all I saw was “Parse error”. By this time, though, I was quite adept at digging into the error messages, and discovered that the problem was really a security error. After a while, it occurred to me that I needed a clientaccesspolicy.xml file on GoDaddy because I was running my test program in the development server on localhost.

By the way, the upload to GoDaddy was a shock. My 600 lines of Excel with 600 images became 1 cxml and 9,000 tiny little “deep zoom”  files, which all took a good 10 minutes to ftp with FileZilla. I’ll have more to say about upload times when we get to Azure.

End of Phase I of the PivotViewer project August 3, 2010

Posted by Toby77006 in PivotViewer.
1 comment so far

I made a small change to my Silverlight program to make it compatible between Azure and my regular web servers. In the Load event, I used this to find out where I was hosted:
If System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString.ToLower.Contains(“blob”)
and then did PivotViewer.LoadCollection accordingly.

What’s next? I think I have to deal with a timeout error. I suspect there is something wrong with my access policy or permissions on the Azure account. I should upload the rest of my data and see how that impacts upload times. I would like to have an image that was not just a simple photo — people keep asking me for another of our applications if the image displayed could be a .pdf. Well, I could fake it…

I want to conclude this series of posts by acknowledging again my debt to the Azure Boot Camp held in Houston in May by Ryan Duclos of Perficient, to the sample code and blogs of of Microsoft’s Tim Heuer and Steve Marx.

The current URLs of my project are in the first post of the series:

BTW this project to date has taken me a good part of my time for a week and cost USD0.02 in Azure charges!