Author Archives: kenny

NetNamedPipeBinding and Impersonation

On of the top benefits to using NetNamedPipeBinding is that we provide an on-box guarantee for your messages. The on-box guarantee is enforced by Denying the Network Security Identifier (SID: S-1-5-2) access to our named pipe. This is the most secure, safest way of ensuring that you are not exposed to connection attempts from the network.

There is a price to pay for this assurance, and it comes in the form of impersonation support in middle-tier scenarios. The short version is that if you are using impersonation, you can only perform messaging to another Named Pipe endpoint using that impersonated token if you negotiate to NTLM in certain restricted conditions.

Here are the gory details:

Over Kerberos, any client/server authentication will always generate Network SID in the access token. When the server authenticates a client all the relevant information is included in the Kerberos ticket presented by the client, and the ticket doesn’t contain information on the location of the client (this is simply not part of the protocol at this point). So even if both client and server are on the same machine, everything works exactly the same as in the remote case, and the resulting access token has the Network SID (because the protocol has no way of knowing that you are on-box).

Over NTLM, if the client uses the current credentials there is an optimization where NTLM references the existing token under which the client process is running instead of generating a new token. In this case you won’t see the Network SID, because the original token was generated by an interactive logon attempt. If your client is configured with specific credentials, then SSPI will consider this a network logon.

When using WCF, Windows authentication is performed through SSPI-Negotiate, which in most cases will select Kerberos as the actual authentication mechanism. However, if the target SPN passed to SSPI is a well formed SPN for the local computer account (e.g. host/[dns machine name]) then Negotiate will use NTLM (loopback optimization) and the access token will not have the Network SID (and therefore will be usable with NetNamedPipes).

Essential Bakery Café (Seattle, WA)

Rating:

Essential Bakery CafeAfter a long hiatus, I’ve now had three crêpes in the past month. The latest was this afternoon at The Essential Bakery Café. The name is familiar to local shoppers, as Essential’s products are in most supermarket’s fresh bread section. Last year, Essential opened a Café/Chocolatier on Madison and 28th (right across the street from Café Flora). Lauren and I were in the neighborhood, and Gio gave the Café positive reviews, so we stopped in for a snack πŸ™‚

Essential Bakery Café is a warm, welcoming place with lots of windows to take advantage of sunny days like today. In the display case are all sorts of tempting chocolates and pastries. They also serve soups, sandwiches, and crêpes. We had a spinach, mushroom and bechemel crêpe. These are large fork-and-knife crépes, quite different from something at say Crêpes A-Go-Go. The shell was very soft, oozing with bechemel, and it was a flavorful package topped with black pepper and scallions. It was quite tasty, but I recommend sharing one as it’s big and intense.

It was difficult to decide which of the sweets to choose from, but we opted for two chocolates: an Earl Grey Truffle in white chocolate and a Ginger Truffle in dark chocolate. Very unique chocolates, much better than your run-of-the-mill truffle from Dilettante’s for example. The tea and ginger flavors weren’t overpowering, they simply added a little bite and complexity to the delectable chocolates they were mixed with.

Overall Essential Bakery Café was a charming place with quality food and snacks. I’ll be back to try the croissants and the chocolate pastries next!

TIP: Free wireless is available from Open-noon and 3PM-Close daily.

Essential Bakery Café and Chocolatier
2719 East Madison Street
Seattle, WA 98112
206-328-0078

Mon: 6:00AM-6:00PM
Tu-Sat: 6:00AM-8:00PM
Sun: 7:00AM-6:00PM

EnumMember and DataContract

In the February CTP, we have a new attribute for interacting with enum declarations for a [DataContract]. While enums are serializable by default (and thus don’t require attribute decoration), you may want to customize the contract names of your enum values (i.e. the names that go on the wire) separately from your implementation naming so that you can version the two independently. For example:

[DataContract(Name=”ColorContract”)]
enum Color
{

[EnumMember(Value=”RedValue”)]
Red,

[EnumMember(Value = “BlueValue”)]
Blue,

}

NOTE: [EnumMember] is not used in the case where you have a member variable/Property of an enum type in your [DataContract]. For those cases, you still use [DataMember], just like you do for the rest of the member variables/properties that you want to include in the [DataContract] for your class.

Top Dog (Berkeley, CA)

Rating:

Multitasking TV and sausage grilling
Top Dog makes an impression on people. Maybe it’s that students can come here at 2AM and treat themselves to a “gourmet sausage” (don’t make the mistake of calling them “hot dog”s). Maybe it’s the logo. For Lauren, the “bird dog” (turkey, bell peppers and cilantro) topped with russian mustard and sauerkraut is what makes Top Dog a required stop on every trip to Berkeley.

My favorite Top Dog story is actually set in Skagway, Alaska. I was on an Alaskan cruise with the family and was wearing my Top Dog T-shirt on a rock climbing excursion. A few climbs in, one of the guides called me over and said “I have a proposition for you. What do you think of this shirt?” And he points to his guide shirt. Turns out the guy grew up in Oakland, loved Top Dog when he was in high school, and really wanted my Top Dog shirt. So we swapped T-shirts (he was stoked), and now I always get asked if I’m a mountain guide when I wear the result of my barter.

Today I was finally able to acquire a replacement T-shirt to accompany my bird dog πŸ™‚

Rock Climbing in Top Dog

P.S. For those that were wondering, Top Dog is the “other” required stop on our Eat Berkeley trips alongside CrΓ©pes A-Go-Go and Chez Panisse.

Top Dog (Berkeley Southside)
2534 Durant
Berkeley, California 94704
510-843-5967

M-Th: 10:00AM-2:00AM
Fri: 10:00AM-3:00AM
Sat: 11:00AM-3:00AM
Sun: 11:00AM-2:00AM

WCF February CTP now available

The WinFx Runtime Components February CTP (including Avalon, Indigo, and Workflow) has been released here.

You can also download an updated Windows SDK and Visual Studio Preview.

There are a number of breaking changes from the January CTP. Ed has a good overview of them here. These changes are predominantly a result of community feedback. Please keep the comments rolling as we head down the stretch towards shipping, and remember to use http://windowscommunication.net/ for access to our latest and greatest community information. Happy coding!

Crépes A-Go-Go

Rating:

Lauren and her savory crepeWhen Lauren takes me to Berkeley, there are two must haves on the “Eat Berkeley” tour. Both are right near campus, quick, cheap, and yummy. The first is Crêpes A-Go-Go — a little place that serves (as you might expect) lots of crêpes. The savory crêpes make for a great breakfast, light lunch, or snack. Lauren is showing off the “house special” (turkey, spinach, egg, and swiss). When ordering an egg crêpe you should know that the eggs aren’t scrambled, they’re fried (with the yolk cooked in the middle of the white). It was yummy, but next time I’ll ditch the egg and stick with turkey (or spinach), mushroom and cheese.

Vid and her dessert crepeThey also have perfect choices for satisfying your sweet tooth, such as the chocolate & fresh strawberries crêpe that Vid ordered (be sure to request the fresh strawberries). It’s best to go here with friends so you can sample both the sweet and savory options!

Crêpes A-Go-Go
2334 Telegraph Avenue
Berkeley, California 94704
510-486-2310

Mon-Sat 8:00AM-10:00PM
Sun 8:00AM-9:00PM

Chez Panisse Café (Berkeley, CA)

Rating:

In my limited experience, Berkeley students are fond of the term “ghetto”. Near campus there are two “food ghettos” where you can grab a quick and cheap bite to eat. Further off campus on Shattuck is the “gourmet ghetto”…dubbed so because it is the area surrounding Chez Panisse.

There are two dining areas at Chez Panisse: the Café (or “upstairs”) and the Restaurant (known as “downstairs”). They both use the same kitchen, the two differences are the menu and the atmosphere. The retaurant is solely 3-5 course prix fixe dinners, and has a softer, more romantic atmosphere. yummy pizetteThe café is a la carte, louder and livelier, and has a lot more seating available. Chez Panisse is owned by the famous chef Alice Waters, and is routinely listed among the best restaurants in America. As such, reservations are a must. Since I called less than a week in advance, the restaurant was completely booked and I gladly accepted a table at the café.

The menu had a number of ingredients that I didn’t recognize. Our helpful waiter deciphered “bottarga di muggine” for us, and asserted that the shaved fish eggs added zing and not fishiness to the pizzetta with sorrel and onions. He was spot on. The pizette was a thin-crust, crispy, wood fired/brick oven masterpiece. It was rich, but not heavy, and a great start to our meal.

Tastiest butternut squash everIn the café the tables are very close together, which means that it’s very easy to eavesdrop on your neighbors’ conversations and to spy on their food (not that LL or I would ever do such a thing ;)). The table to my left received what at first glance looked like a piece of duck, but was really a butternut squash panade with black trumpet mushrooms, gremolata, and friseé salad. I was intrigued, and ordered what turned out to be the best squash dish I have ever tasted. The panade was a stand-out entree, one of those dished that you write home (or on your blog) about. The trumpet mushrooms had clearly been harvested fresh earlier in the day, the interplay between the squash preparation and the vegetables was simply awesome. Chez Panisse’s menu changes daily, but if you are fortunate enough to have this option on your menu, I highly recommend it.

Lauren with her noodlesLauren ordered the hand-cut pasta with North Carolina white shrimp and mustard blossoms. The pasta was soft and the shrimp tender. There was a breadcrumb-like crust atop the pasta which reminded me of comfort food, though it was much lighter than your traditional casserole. Along with the main course we tried the “Chez Panisse Zinfindel”.

Then it was time for dessert. It was a tossup between the “Sierra Beauty” apple crisp (apparently a local favorite) and the dark chocolate homemade ice cream. We opted for the chocolate this time around. The ice cream was reminiscent of the chocolate gelato at Vios, and it was served with chocolate-walnut cookies that were brownie-like in consistency and still warm from the oven. Yum.

Everytime I go to Berkeley my Mom asks if I went to her “favorite restaurant” (a title not given lightly). This time I was very pleased to respond with a happy “yes”!
lots of chocolatey goodness

Chez Panisse Café
1517 Shattuck Avenue
Berkeley, California 94709
510-548-5049

Mon-Sat 11:30AM-3:00PM (Lunch)
Mon-Thurs 5:00PM-10:30PM, Fri-Sat 5:00PM-11:30PM (Dinner)

Crêpe Café and Wine Bar(Seattle, WA)

Rating:

After 8 years in Seattle I had yet to find a decent crêpe place. A few weeks ago, Vidya told me about “this crêpe place in Ravenna” that I had to try. Last weekend we attempted a brunch trip and were foiled when the restaurant was flooded (yikes!). Tonight I was able to cash in my raincheck.

Westchester crêpeThe “crêpe place” is the Crêpe Café and Wine Bar on 65th St and 22nd Ave. On the outside it’s easy to drive right by (I had done so for years). Inside is a smartly decorated, casual but romantic restaurant with tasty crêpes. They also boast some fine wines, if the bottle of Meditrina we had is any indication. But I digress. We were here to sample a change from Seattle crêpe malaise, and were well-rewarded for our excursion.

Lauren and I ordered the “Ritz Carlton” — chicken, swiss and mushrooms topped with a mushroom & wine sauce. Fresh ingredients combined with flavorful seasoning and a tender crêpe to provide a rich, yet light, experience. They also make a mean carmalized onion, as I can attest to from “J’s Crêpe” — a fine mix of savory and sweet inside a buckwheat shell.

Then it was time to see if the dessert crêpes would make the grade. I’ll simply say that the Chocolate & Strawberries crêpe lasted about 1.5 minutes before getting demolished. And then the next few minutes involved scraping the remains of melted chocolate from the plate πŸ™‚ One warning about the dessert menu: not everything on there is a crêpe, so read closely. We ordered a “Jitterbug” which turned out to be espresso and ice cream in a cup, not in a crêpe (oops).

Overall I really enjoyed the Crêpe Café. They have a fine array of both the sweet and savory crêpes, and ambience to accomodate both dinner with friends or romance for two. One final note to set expectations: Crêpe Café is a completely different experience from Paris crêpe stands (more “americanized”-style crêpes), so you’ll have to go somewhere else to satisfy that particular urge.

Tidbit:1/2 price wine night on Tuesdays!

Crêpe Café and Wine Bar
2118 NE 65th Street
Seattle, WA 98115
206-527-7147

Tues-Fri 10:30AM-3:00PM (Lunch)
Sat-Sun 9:00AM-3:00PM (Brunch)
Tues-Sat 5:00PM-10:00PM, Sun 5:00PM-9:00PM (Dinner)

Update (5/7/2006, 5:45PM): Lauren and I took DeAnn here for lunch today. We discovered that you can get top-notch foccacia paninis at lunchtime. We also had a fabulous tomato-garlic soup. Medium thickness, and full flavors. If you order the Westchester crêpe (and you’re not vegetarian), I recommend exercising the “add chicken” option.
DeAnn and Tomato Garlic Soup

MS Arrowpoint Cafe (Charlotte, NC)

Rating:

This week I’m offsite at the Microsoft campus in Charlotte. I’ve been hanging out with the Distributed Systems support team witnessing first-hand how we respond to customer issues. These guys are amazing with windbg. I feel like I’m in The Matrix, except instead of pointing out “blonde, brunette, …”, they look at the hex dumps and are pointing out “string, connection, heap corruption, …”

In some ways the buildings here in Charlotte are similar to what I’m used to in Redmond. But the cafeteria divurges (in a very positive manner) from the one at Augusta. In my hallway I’m notorious for side-stepping the cafeteria wherever possible. In North Carolina, I would be happy to take my lunch downstairs a few times weekly. Overall I was pleasantly surprised by my noon-time experiences here.

On Tuesday I cased the place, and saw some good looking tuna steaks at the grill station. It’s a relaxed atmosphere there, a far cry from the madness of main campus, and the kind grill lady seared the tuna steak for me and I enjoyed it atop a bed of fresh spinach:
grilled tuna steak

While I was waiting for the tuna, someone ordered a chicken cheesesteak. It was enticing, and so on Wednesday I branched out (before returning to the tuna again yesterday). Peppers, onions, lots of cheesy goodness. It wouldn’t hold up on the streets of Philly, but was well above expectations here, and bolstered my high opinions of our Charlotte office food. As a bonus, the arepa on the side was a solid combination of sweet corn and provolone.
chicken cheesesteak

Today I bid the Cafe adieu as Lou and the gang are taking me out for my last day out here. Then back home I’ll return to my off-site lunch tradition πŸ™‚

Microsoft Arrowpoint
8055 Microsoft Way
Charlotte, NC 28273

Mon-Fri 7:30AM-10:00AM, 11:00AM-2:00PM (Breakfast & Lunch)

Large Messages and WCF

CLR typed objects (and buffered messages) are great for a large breadth of applications. Sometimes though, you just want to push bytes. WCF provides a convenient way of doing so with “streamed methods”.

To use WCF’s “Streaming API” you write an operation with an input and/or output of type System.IO.Stream. Because the Stream parameter utilizes the entire body, if an input or an output (i.e. ref parameter, out parameter, or return value) is of type Stream then it must be the only input/output specified in your OperationContract.

When using a Streaming method, you need to pass in a Stream object that provides data incrementally from its Read() method. One common area of confusion is that your return Stream must also be written with the Read() method providing the data. The mental model is that the client is “reading” the return value, and not that the server is “writing” the result.

Now that your operation has been architected so that it no longer requires buffering, you have to choose a binding that is compatible with moving a lot of bytes around. Yasser wrote a nice post on this topic here. In a nutshell you need to:

  • Pick an encoding (Binary for Indigo< ->Indigo scenarios or MTOM if you require interop)
  • Enable streaming on your binding (either through TransferMode.Streamed on a transport or by using chunking at the top of your binding stack)