The Blog

I was recently working on an administrative page for Central Administration, and had the need to use an AudienceEditor control in a form, and more difficult yet, use it inside an AJAX UpdatePanel. The AudienceEditor is the control that is used to enable a user to pick audiences, such as on the Target Audience field in the Advanced section of a Web Part’s Tool Pane.

image

As the picture shows, this form has a TreeView on the left, and a Panel on the right, and depending on what node in the TreeView is selected, the panel on the right needs to refresh and reload the audience information into the AudienceEditor control. Setting the value in the AudienceEditor via C# is easy, just set the .Text property. Everything works fine when you are setting this value once (e.g. PageLoad), but if you have to set this value on subsequent postbacks, you’ll find that the control keeps the first submitted value, and displays that same value after every postback. You’ll also find that if you use this control in an UpdatePanel, and the control isn’t Visible on initial page load, then the control will not work.

To make this work, first thing is make sure the control is not in a Panel or PlaceHolder that is not visible on initial PageLoad (Visible=false). If you need to hide the control in the beginning, then use CSS display:none, and toggle visibility between PostBacks by Toggling the CssClass of the container control.

Next, the control emits several hidden fields, divs, textareas, and javascript variables into the page. If you want the control to display a new value after postback, you’ll have to clear out these elements on the client side just before postback. This will reset the control, and enable it to take a new value and display that new value after the postback.

Following is the function I wrote to clear out the AudienceEditor. Call this on an OnClientClick event of a button or some similar hook on the control that will be initiating the postback (in my case it was the onNodeClicking client-side event of the Telerik RadTreeView control).

Registering my company for a Windows Phone 7 App Hub Marketplace account was not an easy or obvious process. One of the big problems is the use of Windows Live ID as the authentication mechanism. Live ID is a system designed for individual users, which in the App Hub is being unrealistically stretched to apply to companies as well.

Here are the steps I took, and some mistakes I made during the process. Hopefully you can spare yourself from wasting precious minutes of your life like I did.

Step 1 – Create a Generic Windows Live ID

Any company that signs up for a service wants to be able to use a generic account to login with. People change jobs all the time, and you don’t want that account locked out or inaccessible because someone left the company, or their personal email address doesn’t work anymore.

My first step was to create a generic Windows Live ID account for Blue Rooster Inc. I started at the App Hub membership site and clicked the link to Join Now:

image

Then I clicked the link to Sign Up Now:

image

Next, I chose the option that says "Yes, use my email address".

image

At this point, I already had a generic company email alias working (something like apphub@mycompany.com), so I entered that and filled in the other information. Make sure to test this email address first, because otherwise you’ll be stuck if it can’t receive mail.

image

GOTCHA #1: The secret question options are all geared towards personal pieces of data. The only generic one I could use was Favorite Historical Person. I chose someone that made sense for our company, and wrote it down, along with the password.

GOTCHA #2: If you wait too long on this screen, it’ll kick you back to the previous screen.

GOTCHA #3: The CAPTCHA is hard to read. Took me a couple times to get it right.

image

Next I entered my profile data. Since this was a generic account, many of the fields on here were not applicable (Gender, Marital status, etc.). I entered what I thought was best. For birthdate, the company was founded in 2004, so I just put January 1 2004 as the birthdate.

WRONG!!!

GOTCHA #4 MAJOR!Make sure your Birthdate is a valid legal age!

By specifying 2004 as the birth year, the Live ID system thought I was a minor, and wouldn’t let me proceed unless I got a parent to approve this and validate their own identity via credit card. This was a DEAD END, and I had to cancel this account and start over.

image

Next, I validated my email address.

imageimage

Then I had to check my email address and validate the account by clicking the link in the email.

image

GOTHCA #5: This will open a new browser window. You will not be taken back to the App Hub after this (it takes you to www.msn.com), and will have to navigate back yourself.

image

Step 2 – Really Register at the Marketplace

Once you have your generic Live ID working, you can go back to the App Hub and start over. This time I signed in with my new Live ID. I filled out my country, selected Company as the account type, and accepted the terms of use:

image

On the next screen, I really screwed up, but didn’t know it for a while. When you enter your account details, there are two sections, Personal Details, and Company Details. I didn’t want to enter myself or another personal contact in the Personal Details section, as I didn’t know if that would show up in the marketplace when someone viewed one of our applications. I wanted the profile to be generic as well, so I entered "Blue" for the first name, "Rooster" for the last name, and used the Windows Live ID generic email as the email address.

image

Notice the arrow pointing to the message regarding the email address. I figured I was totally fine here, since my generic account can receive email successfully. Also, there is an Approver section at the bottom of the Company Details section that looked like the right place to put my own personal information.

WRONG!!!

GOTCHA #6: If you put generic information in the Personal Details section, GeoTrust will not be able to verify your identity.

Of course they won’t tell you this, and your account will be pending Tax ID Verification indefinitely, and you won’t be able to developer unlock your phone until someone gets back to you. I had to log a support ticket and harass until someone finally emailed me that my account was still pending because of this. I got an email from GeoTrust shortly after, which had a link to a Live Chat session. A gentleman at GeoTrust took my order ID, and changed my contact information, and a couple hours later my marketplace account was fully verified. This whole thing delayed me an entire week.

After this step, you are directed to fill out your profile. This is where you choose your XBox Live Gamer tag (another thing that really does not make sense if you are a generic company account), and setup some default information.

GOTCHA #7: I had a hard time finding a non-used XBox Live gamer tag. I tried "Blue Rooster", "BlueRooster", "Blue Rooster Marketing", and finally had to settle for "Blue Rooster, Inc.".

Unfortunately I’m missing screen shots of the next steps in the process, but I’ll note the process and some gotchas that I can remember.

After filling out the profile details, it was time to provide payment.

GOTCHA #8: The payment system had a hard time with a corporate AMEX card. It was really finicky about the Suite number in the address.

GOTCHA #9: If you want a receipt of the purchase, print the screen that shows the amount. There is no place in the marketplace afterwards to get a receipt, or to view the transaction.

Once you are done with the payment process, you’ll be taken to your App Hub dashboard. You’ll also soon get an email from GeoTrust. If you’ve done this right (and didn’t run into GOTCHA #6), then your email will contain contact information for an individual, not for a generic company account.


After clicking the link, you’ll be taken to a simple page that basically lets you Accept or Cancel the verification process. After finishing this, you can finally breathe a sigh of relief and wait for the verification process to complete.

WRONG!!!

GOTCHA #10: You MUST navigate to the PAYEE DETAILS screen in the App Hub Dashboard, and fill in your bank account and Tax ID information in order to have your tax ID and identity validated. The process never took me there on its own, and there was no email or other communication that told me that I needed to do this.

That’s pretty much it, and much harder than I think it needed to be.

I recently had my blog moved to a different server at my web host, and after the move, I couldn’t connect Windows LiveWriter with my blog anymore. I would get an error "Invalid Server Reponse – The response to the blogger.getUserBlogs method received from the blog server was invalid." I found this post which was exactly my problem:

http://coding-paparazzi.sylvainlafontaine.com/2010/02/solving-connection-problems-wlw.html

I was able to fix it by editing my wp-config.php in notepad and saving with ANSI encoding instead of UTF-8 and re-uploading to my site. That stripped out the byte order mark at the beginning, and fixed my connection issues.

We are making Riesling this year. There were a bunch of grapes still left on the vines, and it was just too tempting to pick them. The bunches came off easily – we didn’t need clippers, just a good tug.

So I don’t forget it, here are the details about our 2010 Riesling:

  • Picked on 11/13/10.
  • 17 crates, about 30 pounds/crate.
  • Crushed on 11/13/10 late afternoon.
  • Pressed on 11/14/10 late morning.
  • Yield – 25 gallons

Some additional info on sugar content:

Started out with Brix of 20,
Added 10 cups of corn sugar which brought the brix up to 22
Added 20 teaspoons of Yeast Nutrient
and the starter yeast was Lalvin, kv1-1116 a good all around white wine yeast.