Skip to main content

CoffeScript vs Script# vs JavaScript, and why it’s funny to me

Greg Roberts

Greg Roberts

Greg Roberts

I’ve seen a lot of buzz around CoffeeSecript lately, mainly because it’s now bundled with Rails 3.1 and there’s been a lot of positive and negative reactions to it. Let me just start out by saying I’ve written a good amount of JavaScript code, and while I’m mainly a .NET developer I’ve played around with other frameworks so I’m not totally ignorant of what is out there.

Fixing the Asp.Net MVC 3 OutputCacheAttribute for Partial Views to Honor some web config settings

Greg Roberts

Greg Roberts

Greg Roberts

While working today I thought I would try out caching a partial view action in my controller. Seems like an easy enough thing and was described as one of the nice new features of MVC 3 release. I quickly ran into issues in my assumption of how this feature would work, and went to the Usual Suspects for trying to figure out what happened.

Now lets get one thing out… The feature works, but it has a couple hidden gotchas that took a while to figure out.

WPF ItemsControl and Operation is not valid while ItemsSource is in use…

Greg Roberts

Greg Roberts

Greg Roberts

See anything wrong with the following XAML:

<ItemsControl ItemsSource="{Binding GridColumns}" Grid.Row="1" Grid.Column="0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Margin="0,14" Height="22" >
<TextBlock TextAlignment="Center" Text="{Binding Name}"></TextBlock>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Clicked">
<n:ExecuteCommandAction Command="{Binding HighlightColumn}" Parameter="{Binding Index}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" >
</StackPanel>
</ItemsPanelTemplate>
</ItemsControl>

Diagnosing Asp.Net Forms Authentication ticket failure on IIS 7 web farm

Greg Roberts

Greg Roberts

Greg Roberts

Have you gotten this error on a web farm sharing forms authentication recently?

Forms authentication failed for the request. Reason: The ticket supplied was invalid

Normally this is a no-brainer, just make sure you have the same machine key settings across servers, but recently I ran into this while setting up a new server and was honestly befuddled for an hour trying to figure out what I had missed. After scouring the back alley’s of google-bing, I finally hit on the right keyword mojo and found this nugget on stackoverflow.com. You remember that security vulnerability found last fall, yeah forgot about that one too, well I guess one of the side effects of the patch was that un-patched servers don’t play nice with each other. Here is a quote from the Gu himself that explains it clearly:

Because the patch modifies the encryption/signing behavior of certain features in ASP.NET, it is important that you apply it to all machines in a web-farm. If you have a mix-match of patched/un-patched systems you’ll have forms-authentication, webresource.axd, and scriptresource.axd requests succeed/fail depending on which server they hit in the farm (since the encryption used would be different across them).

So what are you waiting for, go patch that server!

band-aid

My Initial Thoughts on Xbox 360’s Kinect

Greg Roberts

Greg Roberts

Greg Roberts

I got my Kinect today and thought I would share my initial thoughts. First off the packaging was actually really nice. It’s funny on how much thought and design goes into something that you really only use for a minute and then throw away. I think a lot of this comes from how Apple packages its products and has become somewhat of an industry benchmark. It definitely sets the stage and makes you feel good about your $150 purchase.

kinect