.NET

In case you haven’t heard, VS 2010 and .NET 4.0 are officially scheduled for release on March 22nd. If you’re into playing with Betas (I know I am) and have an MSDN subscription you can go download it now. Those of you without subscriptions will need to wait about a week or so. What I like most about this version of VS2010 is that someone at Microsoft finally wised up and realized that selling a gazillion different flavors wasn’t working and just confused/angered everyone. So now they’ve got just three: Microsoft Visual Studio 2010 Ultimate...

posted Monday, October 19, 2009 9:39 AM | Comments | Filed Under [ .NET Team System ]

Yesssssssss! I’ve been waiting and hoping that this was coming in 4.0 and now it’s official: Full Expression Tree Support. This seems like a HUGE step forward to me. With the advent of this feature, one can finally implement support for converting an expression written in C# to something that runs on the GPU. For example, this would enable a scenario in the future where we can actually write WPF shader code using C#/VB and they can be considered safe because a “GLINQ” interpreter could inspect the statements before it converts them to shader code directly on the fly at...

posted Monday, August 24, 2009 11:04 AM | Comments | Filed Under [ .NET ]

There’s a lot of buzz lately about browsers finally getting JIT’d JavaScript. First it was SquirrelFish in WebKit, then FireFox let the cat out of the bag about their implementation called TraceMonkey  and then Google came out with V8 when they unleashed Chrome on the world. Kudos to all of those teams for pushing performance forward since DHTML/AJAX apps these days are really starting to show the signs of weakness in current JavaScript engine implementations. Now’s when I turn this into a rant on how Microsoft dropped the ball again… Let’s...

posted Sunday, January 11, 2009 4:09 AM | Comments | Filed Under [ .NET Web Development ]

Ok, I’ve just started working with Microsoft’s Distributed Caching API (aka “Velocity”) and while I’m very happy with the features thus far (can’t wait for notifications!), I really think the API needs a TryGetValue method. Right now you have the Get, GetAndLock and GetIfNewer methods and all of those return type Object. My suggestion is two-fold: Add the TryGetValue method with similar overloads to Get. Return a bool which, if true, indicates the item was found. Take it a step further and make the method generic. This will help when working with simple...

posted Saturday, January 10, 2009 7:29 PM | Comments | Filed Under [ .NET Web Services Web Development ]

Ok, I just discovered a nasty little problem with ScriptReferences to script files that are embedded in assemblies that are installed in the GAC… starting with System.Web.Extensions itself. First, in case you’re not already familiar with this subject, the way scripts are referenced when they are embedded into assemblies is by building a URL to the ScriptResource.axd handler that is provided by the ASP.NET AJAX server side runtime. The URL that is build includes two query string parameters: “d” – this is a encoded/hashed copy of the assembly identity that includes it’s typical .NET assembly...

posted Tuesday, July 29, 2008 12:20 PM | Comments | Filed Under [ .NET Web Development ]

Ok, that's a really long title for a post, so what the heck do I mean by all that? Well, I've started working with the CompiledQuery class and I've run into a language limitation problem that almost makes any kind of performance gain I might get from CompiledQuery not worthwhile when using projections due to the fact that they cannot be anonymous so you're forced to define a new class yourself to represent the projection. First off, if you're not familiar with CompiledQuery, it's basically an optimization provided by the ADO.NET Entity Framework that enables it to take your...

posted Thursday, May 15, 2008 12:28 PM | Comments | Filed Under [ .NET ]

It's WPF week over on Channel 9 and a new episode went up yesterday which has David Teitlebaum, a PM on the WPF team, giving an overview and demos of the new lower level features that SP1 brings to the table. You don't want to miss it, so hop on over and check that out. I think we all know the Effects stuff is the most sought after feature, but I know a lot of people were looking for the WriteableBitmap feature since WPF 3.0 and now they have it and, judging by the demo, the performance is amazing.

posted Tuesday, May 13, 2008 8:48 AM | Comments | Filed Under [ .NET WinFx/Vista ]

I just wanted to link to this great post on Silverlight 2's layout and rendering features. Both features borrow heavily from WPF, but there are also important differences. For one, unlike WPF, there is only one tree... no Logical vs. Visual. Also very cool mention of Silverlight 2's rendering internals being many-core friendly so it scales well on the CPU. Big difference from WPF where rendering is offloaded to the GPU.

posted Monday, April 14, 2008 4:58 PM | Comments | Filed Under [ .NET WinFx/Vista ]

I sat in on a very informative roundtable discussion about WCF tips, tricks and pitfalls this afternoon here at the MVP conference. In that discussion one of the topics that came up was load balancing. After some brief discussion, I chimed in with a pitfall that people would need to watch out for which is that, if they're using something like a BIG-IP box from F5, which proxies SSL communication for them, they will have problems getting their message credentials to flow through to the actual web server since communication between the F5 and the web server is done over...

posted Monday, April 14, 2008 4:19 PM | Comments | Filed Under [ .NET Web Services ]

Check out this Mix Session for all the skinny on the enhancements coming in the WPF 3.5 "Extensions" later this year. Unfortunately the Mix sessions site is designed quite poorly in terms of being able to provide direct links, but if you just go to there and look for session T11 - "What's New in Windows Presentation Foundation 3.5", that's the one that shows off all the goodies. Rob shows off new work on the virtualization front, Microsoft's prototype DataGrid control, performance enhancements and so on. The topic I was waiting to hear about most however was the new...

posted Friday, March 07, 2008 4:00 PM | Comments | Filed Under [ .NET WinFx/Vista ]

So what do you think? Will IE8 use the CLR implementation of the JScript engine or keep on using the legacy ActiveScript engine architecture that is plagued with COM circular reference issues resulting in memory leakage and a plethora of other performance problems? Seeing as how FireFox 3 is running about 10x as fast now and is only still in beta, IE has a lot of catching up to do. Performance aside, JScript.NET was designed as closely as possible to ECMA standards at the time which means it already contains several of the features that ECMAScript 4 (spec here, examples...

posted Wednesday, February 27, 2008 9:17 PM | Comments | Filed Under [ .NET Web Development ]

Ok, I have to vent a little here. I was really expecting Microsoft to step up the game for their JavaScript support in VS 2008 and unfortunately there are still some serious issues that prevent it from even getting close. These problems even exist after installing the hotfix rollup that came out last week. Let's start with the intellisense experience. The basic intellisense features such as color coding, variable type inference and formatting seems to be working great... albeit slow at times. However once you start to write your own libraries of ASP.NET AJAX classes, the intellisense starts to fall flat...

posted Tuesday, February 19, 2008 11:21 PM | Comments | Filed Under [ .NET Web Development ]

The recent mention of an improved effects API in the next enhancement release of WPF has gotten me thinking about this again.  I've written before about how other platforms are stepping up their game when it comes to leveraging the GPU in their graphics stacks and how WPF really needs an answer of its own to this problem. As a refresher, WPF has the BitmapEffects API, but it's completely CPU based and pretty much trashes the performance of your WPF apps if you decide to use them because it forces the elements the effects are applied to to also be...

posted Tuesday, February 19, 2008 7:07 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Scott Guthrie blogged today about the WPF roadmap and what kind of enhancements we can expect to see coming in the next few releases. Check out the post for full details, but here's a quick list of things to expect: Improved setup for WPF apps (i.e. ClickOnce enhancements) Improved working set and startup times Performance improvements including DropShadow and Blur effects becoming hardware accelerated (w00t!) Improvements to text features in certain scenarios Media and video performance boost New WriteableBitmap API to finally appease the people looking for realtime bitmap manipulation (like GDI) "Support for new effects API that...

posted Tuesday, February 19, 2008 5:38 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Well, I knew there had to be a reason that we haven't seen any real movement in the ASP.NET AJAX Futures realm for a while... say hello to Volta. Basically it's Microsoft's approach to using .NET to emit client side code (JavaScript). It shouldn't be too big a surprise that Microsoft was working on this because Nikhil Kothari released a prototype called Script# that did something similar back when the ASP.NET AJAX 1.0 bits were in beta. Basically it uses reflection to emit JavaScript types based on your .NET types and, even cooler, will translate the MSIL that your C#/VB.NET/IronPython/etc....

posted Wednesday, December 05, 2007 2:23 PM | Comments | Filed Under [ .NET Web Development ]

All my searching tells me that nobody out there has created a custom Session-State Store Provider for ASP.NET that sits on top of Memcache. Are people just hardcoding themselves to Memcache API directly rather than using the provider model? Or are most people just happy with ASP.NET's out of the box state server? So sad that while Session-State has a provider model, the standard Cache does not. Obviously this drives you to use the Memcache API directly for shared state, so maybe that would explain why everyone just bites the bullet and manages their session state directly through Memcache as...

posted Monday, December 03, 2007 5:28 PM | Comments | Filed Under [ .NET Web Development ]

Well, in case you hadn't already read today, Scott Guthrie has announced a few things about some upcoming beta releases. One of the betas talked about is the next version of Silverlight which used to be labeled as version 1.1. Microsoft has rethought this strategy and is instead going to call it 2.0. If you ask me this is a great idea because the next version is such a major leap forward with the inclusion of the CLR and now a ton of the richer WPF features that it warranted way more than a minor version increase. I'm super psyched...

posted Thursday, November 29, 2007 6:57 PM | Comments | Filed Under [ .NET WinFx/Vista Web Development ]

MacOSX has had their Core Image API for a long time which abstracts you from the GPU. Now Adobe has stepped up to the plate by introducing a preview of a new toolkit who's main technology is a new programming language, codenamed "Hydra", that enables the creation of filters and effects that can be compiled down to run on the GPU (if GPU is not available, it falls back to CPU). Here's their tutorial that gives an example of how to write a filter with Hydra. There's also a gallery of sample filters available here. Kudos to Adobe for attempting...

posted Wednesday, October 24, 2007 9:10 PM | Comments | Filed Under [ .NET WinFx/Vista ]

I'd been thinking about this topic since I saw the new interface. Basically, after seeing the screen shots, I thought to myself that if the new Zune Windows client software was not written with WPF, Microsoft will have made a huge mistake by once again not backing one of their own technologies as a viable platform for developing a real world consumer application. Knowing the type of data this kind of app pushes around, the behavior in the v1.0 client today and looking at the new screen shot, that's an app that screams WPF. So, yeah, I was going...

posted Friday, October 12, 2007 9:39 PM | Comments | Filed Under [ .NET WinFx/Vista ]

For those who may not already know WCF that well, FaultException is a special type of exception class that exists as a way for those of us who are writing service operations that need to throw errors to indicate to those who are extending the WCF stack that "hey, I want the details of this exception to be passed through to the client". The whole purpose of FaultException is so that if something like a database statement fails unexpectedly deep inside the implementation of your operation, the details of that exception, which may include sensitive SQL syntax or schema object...

posted Tuesday, October 09, 2007 12:44 PM | Comments | Filed Under [ .NET Web Services ]

I've been doing a lot of digging around System.ServiceModel.Web lately and have come across a subtle difference in the way the XML is produced for POX endpoints when switching between BodyStyle.Bare and BodyStyle.Wrapped[Response]. The quick and dirty explanation, if you're using Bare and you return a DataContract with Name="Foo", the name of root element returned will be "Foo". If you're using Wrapped however, the root element will be a wrapper element named "<YourMethod>Response" and that will contain a child element named which will be name "<YourMethod>Result" instead of "Foo". For full details, including sample XML output, check out this...

posted Monday, October 08, 2007 1:49 PM | Comments | Filed Under [ .NET Web Services ]

I have been playing with this System.ServiceModel.Web for about a week now trying to get real world prototypes together and, in addition to having a hard time understanding some of their design choices with regards to how/where they plug into WCF, I have come across at least two major limitations. I'll start with brief descriptions of limitations and then elaborate below: You cannot mix WebInvoke decorated methods that specify a UriTemplate with the enableWebScript behavior that is meant to provide compatibility with the JSON protocol (i.e. application/json) that ASP.NET AJAX uses. See my post here on WCF...

posted Friday, October 05, 2007 9:59 AM | Comments | Filed Under [ .NET Web Services ]

Wow, this is a pretty major announcement. They're going to be making the source code available for a significant portion of the BCL, ASP.NET, ADO.NET, WinForms and WPF from day one. Eventually WCF, WWF and LINQ will be available too. Wow.

posted Wednesday, October 03, 2007 11:34 AM | Comments | Filed Under [ .NET ]

I've reported a bug over on connect with the full details, but basically what it boils down to is that there's no way to raise exception detail from ScriptMethods when ASP.NET custom error handling is enabled. What happens is that the RestHandler for ScriptMethods detects the custom error handling is enabled and literally throws out all the details of the exception and returns a generic message instead. This pretty much makes it impossible to know what happened on the server. Did it fail to connect to the DB or was there a business logic problem that the user needs to...

posted Friday, August 03, 2007 2:07 PM | Comments | Filed Under [ .NET Web Services Web Development ]

This is the first list I've seen that covers the new features being added to WPF in .NET 3.5. Top three things that stand out to me: Binding support for LINQ based data sources UIElement3D - adds support for input and focus events to 3D elements (finally, no more hand crafting!) Viewport2DVisual3D - enables you to paint 3D surfaces with interactive 2D elements. This was a sorely missed feature from 3.0 that appeared as an open source project later and has now been folded into the actual WPF API as a first class citizen.

posted Thursday, July 26, 2007 7:32 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Still not sure what Silverlight is or is capable of? Here's a little visual aid to help out. Quite possibly one of the best technology maps I can ever remember coming out of Microsoft actually.

posted Wednesday, May 02, 2007 9:43 PM | Comments | Filed Under [ .NET Web Development ]

There it is. As I suspected, Ray Ozzie just anounced they are pushing out a "first class" .NET runtime environment with Silverlight that will allow you to develop using any .NET languages!!!! I'm waiting to hear details on what exactly "first class" means... will there be full BCL support for example? Update 1:53 EST: Wow. It's a full blown, high performance implementation of the CLR... it even supports new 3.5 language features such as LINQ!!! It supports a "subset" of the BCL, not sure what the specifics are on that yet. They also announced something like HTML DOM integration and a special networking stack. More...

posted Monday, April 30, 2007 9:51 AM | Comments | Filed Under [ .NET Web Development ]

Well, you've probably read this some place else already, but I'm jumping on the bandwaggon since I think it's a huge announcement. The technology formerly known as WPF/E is now officially called Silverlight. You can read all about it over here. I think this is a huge step for Microsoft... and one that's going in the right direction. Perhaps most interesting is that it seems, this post hints at something that has yet to be announced, something I think this post might have already let slip, which is that the .NET runtime may very well come to the Mac in full force (i.e. a complete CLR and framework). That...

posted Monday, April 16, 2007 10:25 AM | Comments | Filed Under [ .NET Web Development ]

We just launched the first version of the site where we depend completely on ASP.NET AJAX to do all our script management. Here's what we did in this initial phase: Added ScriptManager to our Master Page and ScriptManagerProxy to any content pages that required it Changed all static <script> tags to be ScriptReferences Changed all use of ASP.NET 2.0's ClientScriptManager to use ScriptManager instead (i.e. RegisterClientScriptInclude, RegisterStartupScript, etc.) Implemented IScriptControl on our custom controls so now, for the ones that used to have to register their scripts manually through RegisterClientScriptInclude, we just return them through GetScriptReferences ...

posted Thursday, February 22, 2007 1:48 AM | Comments | Filed Under [ .NET Web Development ]

Well, if you've been playing with Atlas, you probably want to run right out and download this latest release. It incorporates a lot of changes which Scott Guthrie covers over here. As someone who's had access to the latest bits for a while now, I've been aware of the changes they were going to make, but now I can finally talk about them publicly a bit. I'm somewhat dissapointed that certain features (xml-script, client-side databinding, etc.) did not make it into the "Core" package, but Microsoft has made a great decision to release these as part of the "Value-Add" CTP. While will...

posted Friday, October 20, 2006 5:41 PM | Comments | Filed Under [ .NET Web Development ]

I was having a problem with serializing a FaultException that had a custom details class that was a collection. Today I figured out that, when using the DataContractSerializer, you need to make sure you provide a setter implementation even for your collection based properties. Once again, this is a departure from the way that the XmlSerializer works. I'm trying to work through the scenarios where this is any kind of improvement over XmlSerializer, but I cannot think of any problem this solves. Welp, I hope this saves someone else some headscratching. I truly hope Microsoft lifts the restriction of only being...

posted Monday, October 02, 2006 9:45 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services ]

So a couple days ago I posted an entry about how to implement a custom transport that allows you to send message credentials over plain old HTTP. Unfortunately when I rolled this into the test environment where I had all the "real" infrastructure in place I ran into a new problem. It appears that the username token implementation built into WCF has some hardcoded logic for how it deals with addresses. I have filed a bug over on Microsoft Connect and I hope that Microsoft addresses it soon. Lately they haven't responded to a single post I've made about WCF...

posted Monday, October 02, 2006 6:07 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services ]

Since I have to define my fault details with DataContractSerializer attributes for now (I hope it's only for now anyway), I was looking at how to translate a property that was previously serialized by the XmlSerializer using XmlArrayAttribute and XmlArrayItemAttribute. Well, I figured out pretty quick there was no equivalent, found CollectionDataContractAttribute, but thought "noooo, this can't be the only way... can it?". Unfortunately a quick search revealed this post by Christian Weyer that confirmed my fears. Why oh why do I have to go writing a whole new collection class now just to decorate it with attributes when I could...

posted Thursday, September 28, 2006 2:01 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services ]

Just found out WCF does not supporting XmlSerializerFormat for custom fault details (see note under Creating Strongly Typed Faults section here). Everything else in my contracts is defined using this approach and now I have to use DataContracts for my fault details? What's up with that? Seems superbly  lame and inconsistent to me. Gonna have to take this one to the forums and possibly to the bug database... Update: No response to my forum post as of yet, so I entered a bug. Go vote on it if you agree that this inconsistency in the API is "teh suck".

posted Wednesday, September 27, 2006 9:40 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services ]

I asked a question in the forums a week or so ago about how one could go about getting username credentials to be passed through HTTP. The problem is that, out of the box, WCF will not allow you to specify message credentials without using a secure transport. This is probably a really smart move for Microsoft because it will prevent people from exposing their credentials. While it certainly causes headaches with development since you need to configure certificates on all your dev boxes, that's probably still not a good enough reason for Microsoft to allow message level credentials go over HTTP...

posted Tuesday, September 26, 2006 4:10 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services ]

I stumbled upon this earlier this year, but I didn't have the time to blog about it then. Since I was just doing some more tuning around the area of code where I applied this technique I figured I'd do a quick write up on it in the hopes that it may benefit someone else out there. If you're doing a lot of dynamic type instantiation, as one would do in a Object Relational Mapping framework for example, and you are using Activator::CreateInstance you are suffering a severe penalty if you're instantiating more than 16 distinct types. Why? Because Activator::CreateInstance uses a cache internally...

posted Thursday, September 14, 2006 10:29 PM | Comments | Filed Under [ .NET ]

Head over to this post to get an understanding of the control naming issue at hand and then leave comments on how you'd like to see it done. I voted for no names by default, auto-naming if none-exists but one is needed (i.e. event handler generation) and suggested they put the name as the very first thing in the smart tag panel for all WPF controls.

posted Thursday, September 14, 2006 4:47 PM | Comments | Filed Under [ .NET WinFx/Vista ]

In my last post about providing custom context I described a way that allowed you to scope the context to the operation/method level. This time I'm going to show you a way that will allow you to scope your context to the service instance level. As you may, or may not, know there are a few instancing modes for WCF services. Per-Call, Per-Session, Shareable and Single. Not only that, but someone could technically invent their own mode of instancing by implementing a custom IInstanceContextProvider. Anyway, despite which mode is used, you may want to tie your custom context to the instance of the service and...

posted Thursday, September 14, 2006 2:11 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services ]

I just filed a bug over on Microsoft Connect about a problem in Expression Interactive Designer with the design time support for an ObjectDataProvider where ConstructorParameters are used. I noticed it a couple weeks ago and never got around to filing, but I just got back into working on the project where I was having the problem and noticed it's still broken even in the latest build (currently Sept. CTP). There's is a workaround that I included with the bug, but it's super annoying and the target audience of EID definitely wouldn't want to have to be doing it every time...

posted Wednesday, September 13, 2006 10:34 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Well, the news is out over on Scott Guthrie's weblog: Atlas has received it's offical name and true to Microsoft tradition it's no where near as cool as the code-name. :P There are technically three major facets to the product formally known as Atlas and Scott does a good job breaking it down, but I'll sum it up here again: Microsoft AJAX Library - this is the client side JavaScript library. You can use this whether your backend is Microsoft or not. It's the equivalent of the .NET framework for JavaScript and helps with everything from providing an OO approach for JavaScript...

posted Tuesday, September 12, 2006 12:29 AM | Comments | Filed Under [ .NET Web Development ]

We officially rolled out a release of the "My" Mimeo.com web application this weekend. While we actually added some really great customer features, one of the biggest things in this release development wise was a full upgrade to use several features of ASP.NET 2.0 that were previously solved by a bunch of proprietary code that I wrote and the famous Wilson MasterPages. Here's a rundown of features we are now leveraging as opposed to relying on third party: Master Pages -- we used Wilson MasterPages, they served us well :) Validation Groups -- I had written a method called ValidateContainer which would walk the...

posted Monday, September 11, 2006 10:23 PM | Comments | Filed Under [ .NET Web Development ]

First off, I'd like to say that I absolutely love how extensible WCF is. So far there hasn't been anything I can't do. Unfortunately the documentation, examples and guidance around extensibility is still lacking a bit at this point. This is somewhat disturbing considering that RC1 just went out. Now, on to what I really want to talk about here: providing custom context to your service implementations. We have an in house framework here at Mimeo, called our system framework, that provides some context much like System.Web's HttpContext or even System.ServiceModel's OperationContext. This in house framework exposes the current instance via a Current property (again, just...

posted Tuesday, September 05, 2006 11:39 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services ]

My friend Doug pointed me to Miguel's post about WPF today where he calls it the J2EE of GUI APIs. While I've read some of Miguel's previous posts about WPF, to make such a broad statement as this, you would think a person would back it up with some examples of exactly what about Avalon is so overly-complex, but he doesn't. His previous complaints are about things like the sandboxing model (XBAP/ClickOnce), the fact that there's no GUI designer (which now there is with EID and Cider) and ignoring standards (not using SVG/HTML/CSS), but none of those seem to support today's J2EE comparison. Heck,...

posted Thursday, August 03, 2006 3:11 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Guess we can look forward to the first service pack for VS 2005 in Sept. For details, check out this page over on MSDN.

posted Wednesday, July 26, 2006 1:38 PM | Comments | Filed Under [ .NET Team System ]

I noticed via a post on Rob Relyea's blog that an interview, with Rob himself, was posted over on Channel9 last night. The interview is all about XAML and how it works its magic. Why XAML? Is it compiled? If so, how does it get compiled? WTH is BAML? How does the code-behind get wired together? All these questions and more are answered, so go check it out!

posted Thursday, July 06, 2006 1:47 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Inspired by Craig's MSDNMan, Ian has created an MSDN browser with WPF. If, like me, you read a ton of MSDN content every day, both of these tools are extreeeemely welcome additions to browsing the online content or using the installed version of the content.

posted Wednesday, June 21, 2006 3:03 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services Web Development Windows PowerShell Team System ]

Just noticed, thanks to this post over on MSDN Weblogs, that the ADO.NET vNext Documentation is back online. There's two articles to check out: The ADO.NET Entity Framework Overview Next Generation Data Access

posted Sunday, June 18, 2006 6:50 PM | Comments | Filed Under [ .NET ]

I mentioned ADO.NET v3 a little while back, but all the info that leaked out was pulled. Now there's a video up on Channel9 with Anders Hejlsberg and Sam Druker on the entity features that are coming with the next version of ADO.NET. The driving technology for all of this is of course LINQ. Exciting times ahead!

posted Tuesday, June 13, 2006 1:29 AM | Comments | Filed Under [ .NET ]

Here's a great Channel9 screencast that just came out demo'ing how the typical interaction between developer and designer will work with Visual Studio and Expression Interactive Designer. One thing about EID that I love which is demo'd here is the fact that control behavior is live in EID. That is, any behavior you've built into your controls will function, real-time, inside of the IDE. This really helps the designer visualize exactly what they're going to see/experience without necessarily having to compile and run the project.

posted Monday, June 12, 2006 10:58 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Heads up on a silent breaking change that I just came across with FormsAuthentication's RedirectFromLoginPage method when migrating from ASP.NET 1.1 to 2.0. The exact message you get will be (with top of callstack): System.Web.HttpException: The return URL specified for request redirection is invalid.  at System.Web.Security.FormsAuthentication.GetReturnUrl(Boolean useDefaultIfAbsent)  at System.Web.Security.FormsAuthentication.RedirectFromLoginPage(String userName, Boolean createPersistentCookie, String strCookiePath)  at System.Web.Security.FormsAuthentication.RedirectFromLoginPage(String userName, Boolean createPersistentCookie)... your method would be here ... There problem here is that some part of your return URL contained invalid characters. In my case, someone was creating a return URL where the query string was not properly encoded and it contained : and / which need...

posted Friday, June 09, 2006 6:03 PM | Comments | Filed Under [ .NET Web Development ]

I just spent the majority of the day fixing some code that was migrated from .NET 1.1 to 2.0. The code in question does a lot of DateTime conversion with respect to timezones. The existing code would basically take the UTC date it was given and adjust it by some arbitrary number of hours representing the timezone offset for a particular facility. It also must take into account that lovely concept known as daylight savings time. We have a class called ProductionFacility and one of the things we need to know about it is what its timezone offset is from UTC on a...

posted Thursday, June 01, 2006 12:12 AM | Comments | Filed Under [ .NET ]

Wow, check this MSDN article out. The future sure looks bright for ADO.NET. Coupled with the recent innovations in client databinding technologies (ASP.NET 2.0, WinForms 2.0), forthcoming LINQ innovations and forthcoming client databinding innovations in WPF (Windows Presentation Foundation).  Microsoft sure seems set to take data access, manipulation and presentation to the next level. The only question I have is, what is the WinFS team doing while all these other technologies are emerging around it? I hope they align themselves properly, because it would be a shame for WinFS to come out and not provide a programming model consistent with these new advances. Update 5/13: Looks like they...

posted Friday, May 12, 2006 1:32 AM | Comments | Filed Under [ .NET ]

A May CTP of LINQ was dropped a couple of days ago. One of the coolest new features is without a doubt IQueryable<T>. Check out this explanation of it here on Matt Warren's weblog. Also very cool is the ability to dynamically compose and then compile lambda expressions into IL. Oh and definitely check out this post from Eric White to familiarize yourself with the nomenclature used when talking about LINQ. I can't wait to start LINQifying™ our O/R mapping layer in my spare time. Unfortunately, I seem to spend too much time theses days providing valuable features to the company's customers to be able to play...

posted Thursday, May 11, 2006 9:50 PM | Comments | Filed Under [ .NET ]

Microsoft's mea cupla for screwing up the web project model with the Web Site Project type has been released. We've been using it here at Mimeo ever since we started our 2.0/2005 migration and had great success wth it even in the beta stages. The differences between RC1 and Release are surprisingly big, but I guess they did enough internal testing to feel it was solid enough and pushed it out the door. Read all about it on Scott Guthrie's blog and/or download it from here. Big thanks to the team that worked on getting this out there! Oh and make...

posted Tuesday, May 09, 2006 5:44 PM | Comments | Filed Under [ .NET Web Development Team System ]

I just whipped up an implementation of an expression for ASP.NET 2.0 that will do String::Format on top of a string fetched from resource file. You can read about and download it from here.

posted Tuesday, May 09, 2006 5:23 PM | Comments | Filed Under [ .NET Web Development ]

This interview with Michael Wallent over on Channel9 is hands down the best public explanation I've ever seen/heard from Microsoft on why WPF was created and what some of the major goals and design decisions were. Some interesting tidbits that came out of the interview: Plans to make an WPF “scene” 100% scriptable for smoother integration with Web apps Plans to expose the MIL (Media Integration Layer), which is the lowest level for WPF rendering, as a supported API so others can build rich media applications on top of it directly as opposed to necessarily forcing you through the managed API Plans for a faster release...

posted Tuesday, April 25, 2006 6:15 PM | Comments | Filed Under [ .NET WinFx/Vista ]

I did some research back in the beta days of VS2005 for upgrading our existing site to take advantage of a bunch of different features that we had either written custom code or used third party code for. One of those features was localization/globalization. I had spent a bunch of time writing custom resourcing support into our existing ASP.NET 1.1 app that very closely mimic'd what ASP.NET 2.0 and Web Site Projects were going to offer. I have a LocalResources directory per sub-directory that contains all our resx files and then I have a bunch of functions that understand how to resolve those resources based on...

posted Tuesday, April 18, 2006 7:43 PM | Comments | Filed Under [ .NET Web Development ]

It's late and I'm definitely overtired and getting that halo effect around my monitor, but... am I missing something or does VS 2005 give you no way to do PDBOnly builds through the IDE? Well, in any case I made it do it by editing the csproj, which is just an MSBuild file, by hand. All you have to do is go into the file and find the <PropertyGroup> that corresponds to your configuration and platform, in my case Release|AnyCPU, and edit the <DebugType> property to be “pdbonly” instead of “none”.  I certainly hope I'm just missing some checkbox somewhere because I don't know...

posted Monday, April 17, 2006 7:02 PM | Comments | Filed Under [ .NET Team System ]

I just posted this question to the forums, but I figured I'd post here as well in case anybody subscribers out there know the answer and also for future edification: I create a new ASP.NET performance session and point it at my web application directory (i.e. not using IIS). Now, I can sucessfully get performance data for the web site itself, but I cannot seem to get performance data for any other project assemblies I've configured for instrumentation. At first I noticed that it was instrumenting the project assemblies in their respective project \bin directory as opposed to my web site's \bin directory....

posted Thursday, April 13, 2006 4:31 PM | Comments | Filed Under [ .NET Team System ]

You can read all about RecursiveDir here, but basically MSBuild supports a syntax for recursive directories that goes a little something like this: C:\My Projects\**\*.xml Basically this says, go recursively through every directory under C:\My Project and find me all the files with an .xml extension. Simple right? Ok, now imagine you structured all your projects in such a way that you kept certain xml files in certain subdirectory of each project... let's call it “Test Results”. So, if I want to grab all the test results for all projects, but not any other .xml files, I would do this: C:\My Projects\**\Test Results\*.xml Follow so...

posted Wednesday, April 12, 2006 9:27 AM | Comments | Filed Under [ .NET ]

We started working with MSBuild recently and I had to write my own task for selecting XML nodes out of documents. Here's an article that covers my experience in detail complete with source code for the Task.

posted Tuesday, April 11, 2006 8:13 PM | Comments | Filed Under [ .NET ]

Today was a learning day for me. The subject? MSBuild. I was familiar with the basics and have used nAnt for a while now, but now that Mimeo's getting ready to transition to VS 2005 + Team Foundation Build we really want to know what we're going to have to do to migrate our existing scripts. The number one thing to get your head around is Items and their Metadata. Read this and then read it again immediately. That link also links to this page about well-known Item Metadata which is important to understand. Items are like structs. Items usually represent assets imported into...

posted Tuesday, April 11, 2006 7:50 PM | Comments | Filed Under [ .NET ]

Peter just posted a nice little MSH script for listing out csproj files and their guids. Feeling inspired, here's one I wrote that helps me find all projects that reference another project: get-childitem -Include *.csproj -Recurse | where-object { ([xml](get-content $_)).SelectSingleNode('//*[local-name() = "ProjectReference"]/*[local-name() = "Name" and text() = "<your project name here>"]') -ne $null } | sort-object Name | select-object Name Plop the friendly name of your project into the “<your project name here>” and you can easily find any projects that reference the project you're lookin' for. Note I had to use ugly XPath local-name() hacks to get around the fact that...

posted Monday, April 10, 2006 5:36 PM | Comments | Filed Under [ .NET Windows PowerShell ]

You can read about what's new/fixed in the RC here on Scott's weblog, download it here and, for more info on why this new project type was created, check out this MSDN article.

posted Monday, April 10, 2006 9:08 AM | Comments | Filed Under [ .NET Web Development ]

Here's a heads up for anyone else out there working with Team Test Projects: If you use an App.config in a Team Test Project and you make changes to it and then try to run the test again from the Test View the project will not redeploy the .config file to the bin directory with the test assembly. You must explicitly rebuild the test project to cause this to happen. I spent about five minutes scratching my head on this one, so hopefully this will spare at least one other person out there from wasting anymore than that on it. ;)

posted Friday, March 31, 2006 1:48 PM | Comments | Filed Under [ .NET Team System ]

Now that TFS has RTM'd, check here for documentation about migrating your test environments to a production environment. I've been eagerly awaiting this documentation so that we can finally get off our slow ass VM evaluation environment onto some brand spankin' new hardware purchased to run TFS and nothin' but TFS! ;) I'll be sure to post our experience with this process once it's complete.

posted Wednesday, March 22, 2006 12:17 PM | Comments | Filed Under [ .NET Team System ]

As you can probably tell by my last post, I spent some time learning MSH (formerly Monad) this weekend and am super pysched to use it as part of my every day problem solving. I picked up the Monad book by O'Reilly and and it was a really great jump start on learning the basics. Most amazing however is, once you learn the basics, everything else really does just come together because of the consistency that is encouraged within the environment. The true power of the environment comes from it's ties to .NET of course since you can manipulate any .NET...

posted Monday, March 20, 2006 6:20 PM | Comments | Filed Under [ .NET Windows PowerShell ]

For anyone who's familiar with WATIR, check out this simple MSH script I whipped up: # Create an instance of IE$ie = new-object -ComObject "InternetExplorer.Application"# Navigate to MSN search$ie.Navigate("http://search.msn.com")# Make IE visible$ie.Visible = $true# Grab the DOM document instance$document = $ie.Document# !! See note at end of post !!# Get the query text box and set the search term$document.getElementById("q").innerText = "Drew Marsh"# Click the search button$document.getElementById("srch_btn").click() Now granted this isn't doing the exact same thing as WATIR yet (i.e. it's not really emulating keystrokes to the text box), but basically all one needs to do is create a customized “snap-in” for MSH...

posted Monday, March 20, 2006 8:51 AM | Comments | Filed Under [ .NET Web Development Windows PowerShell ]

Ryan Dawson has a couple of articles up over on Longhorn Blogs titled “XAML and C#” where he's discussing the developer experience of working in a mixed language environment for developing next generation Windows applications. In his second article he states the following, which prompted me to write this post in response: "XAML is a language (technically this is false, since it is compiled into C# first and then into IL, but you get my drift)." XAML is indeed a language, but it is never compiled into C# or IL. In fact, let's not even talk in terms of C# because XAML can be used from/in...

posted Thursday, October 06, 2005 7:30 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Dan Fernandez has a nice post on how to go about writing your first extension method in C# 3.0. I liken the concept of extension methods to a variation of prototyped based programming where you can assign a new method to any type just by adding it to the prototype. It's not 100% the same, but if you're familiar with that concept it should help get the concept of extension methods across. I also just attended a chat session on C#3.0 yesterday (transcript not yet available) where they mentioned they were considering how to do extension properties as well. That would be very interesting...

posted Friday, September 23, 2005 11:59 AM | Comments | Filed Under [ .NET ]

Here's a great article from IanG on the what the “var” keyword is all about in C# 3.0. If you're still not quite sure you understand what all the fuss is about, this article will definitely help clear things up for you.

posted Friday, September 23, 2005 10:36 AM | Comments | Filed Under [ .NET ]

Still not sure what LINQ's all about or why it's “so freakin' cool”? Well check out the 101 LINQ samples up on MSDN. WARNING: You may want to put a bib on before clicking through to the article as involuntary drooling may ensue shortly after you begin reading. ;P

posted Wednesday, September 21, 2005 5:22 PM | Comments | Filed Under [ .NET ]

I'm gonna come across as defending MS here, but really I just think this assesment of LINQ from Frans Bouma is just completely off base. LINQ has nothing to do with ORM at its core, instead it enables richer ORM scenarios with natural language query extensions for developers. If you want to talk about DLINQ, well that's another story, but then you're talking about a layer built on top of LINQ and it is a completely separate beast and some of us have already had that discussion over on Paul Wilson's blog. That said, I realize that most of the demos were done with DLINQ so...

posted Monday, September 19, 2005 10:06 AM | Comments | Filed Under [ .NET ]

Now that BitmapEffects (formally ImageEffects) have returned in this build of WPF, some have already begun wondering why there are only two (drop shadow and blur). Well, fear not! At the final PDC session I attended, where the low level architecture of WPF was discussed in an open forum manner, the WPF team has said that they already have 48 effects under development and planned for the first release. Let's also not forget that the API is 100% extensible and Microsoft sees a market for third parties to develop effect libraries.

posted Sunday, September 18, 2005 6:54 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Wow, the future sure looks bright for rich web application development. I like the approach they've taken to get client side data, using JSON, from Web Service method calls. They've also built a rich client side framework of utility classes. The server side story is also very good in that they have a suite of rich Atlas-specific controls/components which spare you having to do a lot of “glue”ing of UI elements to JavaScript if you want to avoid it. My one complaint is that there are a lot of paralells in architecture between the Atlas and WPF and you can even see a lot...

posted Wednesday, September 14, 2005 6:39 PM | Comments | Filed Under [ .NET Web Development ]

Ok, so I just finished the C# 3.0 session given by Anders. Basically C# 3.0 is receiving functional style programming through the addition of lambda expressions. Even scarier is that the lamba expressions can be compiled into actual IL or into an expression tree which custom methods can turn into something like a SQL statement under the covers. Really hard to visualize just from me writing about it, but believe me it's HUGE. At the same time it is also receiving the ability to do psuedo-prototype based declarations through the use of a technology called extensions which allow you to add...

posted Wednesday, September 14, 2005 4:42 PM | Comments | Filed Under [ .NET ]

The hottest technology of the PDC so far is LINQ for me. I'm a huge fan of O/R mappers and have written my own and so it's quite interesting to see how DLINQ has come together. Anders just made a comment like “With DLINQ we allow you to return only partial object queries, no other O/R mapping layer can do that so easily!”. Well... uhh... yeah, but you changed the entire compiler architecture to do it! :) The good news though is that everything they've come up with to implement LINQ is fully extensible. That means I'll be able to keep my...

posted Wednesday, September 14, 2005 3:14 PM | Comments | Filed Under [ .NET ]

I don't know how many people have begun digging into the Avalon/WPF bits that were released for the PDC, but there are a ton of breaking changes. The biggest breaking changes that are bound to affect any existing projects are in the Animation APIs. To that end, I'm working on a new change log to help give people who have been playing with previous bits a smoother migration. Keep your eyes peeled.

posted Wednesday, September 14, 2005 3:01 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Currently blogging from my little hotel room desk at the Wilshire Grand. I'm in room 446, my cell is 973.699.0532. Feel free to give me a buzz if you'd like to chat or grab some grub. One thing I will say is that there is already a larger female presence here at this PDC than I've ever seen at any previous PDC. Unfortunately, just as I was reflecting on and being impressed by that, I was sadly reminded as to why there aren't more women in this business by some childish, chauvinistic guys cracking the usual slew of jokes on my bus ride back to the hotel from...

posted Monday, September 12, 2005 5:56 PM | Comments | Filed Under [ .NET WinFx/Vista Web Services Web Development ]

I was looking for a quick an easy way to generate a key pair that I could use to do some prototyping around encrypting data. I'm no crypto expert (or at least wasn't!) and knew about SN.exe for signing .NET assemblies so I figured I'll just use that. So I generated a key using the -k Foo.key command line option and then installed it into a machine container using sn -m y, sn -i Foo.key “FooKey”. Next I hooked up a quick command line app that took some arbitrary data, loaded the key from the container using CspParameters::KeyContainerName into an RSACryptoServiceProvider...

posted Thursday, August 25, 2005 11:24 AM | Comments | Filed Under [ .NET ]

I started an Atlas Wiki homepage over on Channel9. Dying to get some new info out of Microsoft, but so far it looks like they're keeping their lips sealed until the PDC.

posted Thursday, August 25, 2005 10:52 AM | Comments | Filed Under [ .NET Web Development ]

Tim Sneath posts up the official set of changes (Word format) for the May Beta 1 RC. Word is this will also be availble on MSDN soon. It actually has a less complete list of renames/reorganizations than the change log I've been maintaining so be sure to check that out, but it does a better job introducing some of the newer features added in this release.

posted Tuesday, May 24, 2005 11:56 AM | Comments | Filed Under [ .NET WinFx/Vista ]

I've started documenting some of the changes to the Avalon APIs between the March CTP and the May Beta 1 RC. The list is brief and only includes the major ones for now, but I'll continue to update it as I learn more. The intention of this list is to hold people over until Microsoft posts an official list of their own.

posted Monday, May 23, 2005 11:46 AM | Comments | Filed Under [ .NET WinFx/Vista ]

From the main download page, you will find a link to the updated SDK (iso format). Looks like Friday's announcement kinda jumped the gun, but it's all available now. Oh and for those who were asking, yes, this build is 100% compatible with Whidbey Beta 2.

posted Monday, May 23, 2005 9:22 AM | Comments | Filed Under [ .NET WinFx/Vista ]

This ought to supply the geeks with something to do this weekend... besides going to see Star Wars of course. ;) I'll try and do some coverage of Avalon changes/additions since the March CTP. Oh and congrats to both teams for reaching Beta status! Note: if the link doesn't come up for you I think it's because it's still propagating through Microsoft's server farm, give it a little time. Update (3:32AM): Download still not working? Well, here's a direct link to the executable. Time for me to sleep off a night of partying, enjoy!

posted Friday, May 20, 2005 5:19 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Nick Kramer, a PM on the Avalon team, bursts into the blogging scene with his first post being about Avalon's various naming conventions. The primary need for these conventions is for discoverability through reflection. The primary “client” that needs to reflect on types using these patterns is the Avalon serialization architecture itself. However, these patterns can also be leveraged by design time tools to discover interesting aspects about Avalon based types.

posted Friday, May 20, 2005 3:38 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Dare posted up the other day about Microsoft's language choices and how they have “missed the boat” with some of today's trendsetters. He mentions that Microsoft is too busy competing with Java and the JVM with C# and, as a result, other language/technology crowds aren't receiving enough attention. He makes some good points, so definitely give it a read. I originally just commented on the post because at one point he states that Microsoft provides no JavaScript IDE. Since I've been using versions of it since around 1996, that just didn't seem to make sense to me. Not to mention the Visual Studio IDE has provided the best JavaScript debugger out there (IMHO) since v6.0 with...

posted Friday, May 20, 2005 8:07 AM | Comments | Filed Under [ .NET ]

Chris Anderson is jumping on the Python bandwagon and is building support into AvPad for IronPython as a scripting language. Pretty interesting stuff. In his latest post, he has extended IronPython to support ICustomTypeDescriptor so that you can interrogate an IronPython object at runtime and discover properties that may have been added on the fly. The main purpose Chris added this is beause it is actually one of the interfaces Avalon will use for reflection as he shows here in a databinding example.  On a related note, I wonder if IronPython already has support for IExpando? If not perhaps they should consider adding it...

posted Wednesday, May 11, 2005 10:45 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Disclaimer: C# Express/March CTP/.NET version v2.0.50110 This is for the performance concious freaks out there (like me). The following code results in a new Delegate instance being constructed every pass through the loop even in release builds: private void MyBackgroundWorker(object state) { for(int work = 0; work < 10000; work++) { this.Invoke(new MethodInvoker( delegate() { ...

posted Tuesday, May 03, 2005 6:18 PM | Comments | Filed Under [ .NET ]

Rob Relyea just posted up a little piece that details the three different approaches developers can take to code their Avalon applications. I'm not sure if he was working on it prior to this, but there was a question in the Avalon NG earlier today about how a Delphi person can code Avalon applications and this answers that perfectly. Basically, because Avalon is “just” another CLR API, you can always code against it with any language that runs on the CLR (2.0). However, when it comes to XAML you have a couple different options depending on your language's support for the CodeDom and MSBuild.

posted Wednesday, April 27, 2005 4:21 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Here's a tidbit of info that will hopefully help some people out. It took me a couple stabs at Google keyword combinations to find the answer. Basically the problem was that we're taking user input in an HTML page which can include Unicode characters and need to pass that on the query string to an ASP.NET handler for processing. What was happening is that when the data was got to ASP.NET the Unicode characters seemed to have been stripped out. Now, being a very Unicode concious person I'm wondering why the heck this could possibly happen considering I've got my...

posted Monday, April 11, 2005 3:31 PM | Comments | Filed Under [ .NET Web Development ]

This is a great idea and I'm definitely interested in entering, but unfortunately it's only open to Canadian contestants. When's the North American version coming?

posted Monday, April 11, 2005 10:39 AM | Comments | Filed Under [ .NET ]

I came across this post and figured I'd offer up my own opinions as well... The default formatting would honestly keep me from using the class designer for anything but reverse engineering and visualizing the code I have already hand written. Even though everyone has a different way of doing it, the structure of the code is what really matters when it comes down to efficiently parsing it with the human brain. And let's face it, we're still not at a point (yet) where developers can avoid editing the source files by hand. You should really be able to control the output of...

posted Wednesday, March 30, 2005 4:09 PM | Comments | Filed Under [ .NET ]

Saw this morning that the SDK is now available to the masses. Click here to head on over and download it. Make sure you're running the right VS.NET versions and that you pay close attention to the uninstall/re-install order. FWIW, I had no problems uninstalling the previous CTP and installing the new CTP on top of the same VPC instance.

posted Friday, March 25, 2005 8:53 AM | Comments | Filed Under [ .NET WinFx/Vista ]

You know VS.NET 2003 is going to blow up when you look at the process with cordbg and see way too many “Compilation Domains”:PID=0x910 (2320) Name=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\ ID=113 AppDomainName=Compilation Domain ID=112 AppDomainName=Compilation Domain ID=111 AppDomainName=Compilation Domain ID=110 AppDomainName=Compilation Domain ID=109 AppDomainName=Compilation Domain ID=108 AppDomainName=Compilation Domain ID=107 AppDomainName=Compilation Domain ID=106 AppDomainName=Compilation Domain ID=105 AppDomainName=Compilation Domain ID=104 AppDomainName=Compilation Domain ID=103 AppDomainName=Compilation Domain ID=102 AppDomainName=Compilation Domain ID=101 AppDomainName=Compilation Domain ID=100 AppDomainName=Compilation Domain ID=99 AppDomainName=Compilation Domain ID=98 AppDomainName=Compilation Domain ID=97 AppDomainName=Compilation Domain ID=96 AppDomainName=Compilation Domain ID=95 AppDomainName=Compilation Domain ID=94 AppDomainName=Compilation Domain ID=93 AppDomainName=Compilation Domain ID=92 AppDomainName=Compilation Domain ID=91 AppDomainName=Compilation Domain ID=90 AppDomainName=Compilation Domain ID=89 AppDomainName=Compilation Domain ID=88 AppDomainName=Compilation Domain ID=87 AppDomainName=Compilation Domain ID=86 AppDomainName=Compilation Domain ID=85 AppDomainName=Compilation Domain ID=84 AppDomainName=Compilation Domain ID=83 AppDomainName=Compilation Domain ID=82 AppDomainName=Compilation Domain ID=81 AppDomainName=Compilation Domain ID=80 AppDomainName=Compilation Domain ID=79 AppDomainName=Compilation Domain ID=78...

posted Wednesday, March 16, 2005 5:05 PM | Comments | Filed Under [ .NET ]

I'm sure we've all seen Richard's commentary on the state of .NET as well as Dan Fernandez's rebuttal. If not, go read those first. Since the subject has already been talked to death from the .NET framework perspective, the only thing that I wanted to address is the assertion that Richard makes in his follow up comment in Dan's rebuttal where he states: As to your comments on Avalon and Indigo. I concede your point about Indigo, but I refute your point about Avalon. In Dec 2004 a tech preview of Avalon was made publicly available on MSDN downloads, and by examining this...

posted Monday, March 07, 2005 9:32 AM | Comments | Filed Under [ .NET WinFx/Vista ]

Ok, so I was reading /.'s coverage of Mark Lucovsky jumping ship from MS to Google. Naturally I expected the typical anti-MS spin and of course it was there, but in the form of link to an entry on Mark's blog about Microsoft not being very good at shipping software. In this entry Mark analyzes the way Microsoft ships their software (specifically he mentions the .NET framework) vs. the way Amazon ships a fix for their software (their web site). Maybe if Mark expanded a little bit on what he believes the right answer to the problem is I could understand his angle a little better,...

posted Thursday, March 03, 2005 4:57 PM | Comments | Filed Under [ .NET WinFx/Vista ]

This post goes out to whoever in Microsoft might be able to shed some light on the subject: When, if at all, can we expect to see support for E4X in JScript[.NET]? My main reason for asking is because Mozilla recently added support for it to their ECMAScript implementation and I can already see the same thing that happened when people wrote code for proprietary DOM implementations is going to start happening again. This time though, it's going to be E4X code not working in IE. I realize C-Omega should eventually result in similar features being added to C# 3.0, but that's no...

posted Tuesday, March 01, 2005 3:24 PM | Comments | Filed Under [ .NET Web Development ]

I saw Brad's post entitled The Love Affair is Over which is a response to the announcement of support for generics being added to the CLS 2.0 and wanted to chime in. In Brad's post he mentions that James Robertson shares the same opinion. It seems to me that James has confused CLS (Common Language Specification) and CLR (Common Langauge Runtime), a common misconception, but I'm just not sure if Brad is doing the same or if he just doesn't like the fact that the proposed CLS rules regarding generics are so weak. What's the big deal with the CLS not supporting 100% of the features...

posted Wednesday, December 22, 2004 9:50 AM | Comments | Filed Under [ .NET ]

Woah, this seems to have come out of left field. This is the version that runs on Window XP SP2 and 2003. Read all about it here and then go download it on MSDN subscriptions under  “Tools, SDKs, and DDKs -> Platform Tools, SDKs, DDKs -> Tools, SDKs, and DDKs | Platform Tools, SDKs, DDKs”. I guess we know what most of us will be busy playing with this weekend! ;)

posted Friday, November 19, 2004 4:19 PM | Comments | Filed Under [ .NET WinFx/Vista ]

Betrand Le Roy made a post called “Why you shouldn't expose public properties from your pages”. For the 99% of the scenarios I agree with him since it would obviously prevent your control from being reused ubiquitously, but there is at least one scenario where I see this as acceptable: when creating a shell environment scenario like Windows Explorer or MMC. We have the concept of a Library at Mimeo. The Mimeo Library implementation behaves a lot like MMC. You can plug in folder providers (analogous to MMC snap-ins or Explorer Shell Extensions) for the tree view on the left and then each of those...

posted Wednesday, November 17, 2004 9:10 PM | Comments | Filed Under [ .NET Web Development ]

Jeff Putz asks “What happend to the Whidbey hype?”. It's a great question and a few people have already commented on the post with their thoughts, but I figured I'd chime in with my thoughts here. I think the biggest reason things have died down is that back then the features were new to the runtime or our favorite language so everyone was excited about learning about how they work. Usually those of us geeky enough to even be interested in hype like this grok how things work relatively quickly. So we've gotten past the "ooohs and ahhhs" stage where someone posts a snippet that shows...

posted Wednesday, November 17, 2004 2:38 PM | Comments | Filed Under [ .NET ]

I've looked around and haven't seen this described anywhere. It's a tough bug to come up with a succint search query for though, so maybe I just missed someone else reporting it. In any case here are the details in case anyone else ever runs into this. Basically, if you create a UserControl, decorate it's code-behind class with [ParseChildren(true, “Content”)] where “Content” is a property of the control of type ControlCollection that redirects the controls to a region within the UserControl (say a PlaceHolder), then use this control inside of your WebForm and define an <input> as a child element it will blow up...

posted Monday, November 15, 2004 9:34 PM | Comments | Filed Under [ .NET Web Development ]

Shawn Van Ness posted a list called “101 Uses for Nested Classes”. I found it informative so maybe you will too. Utilty classes is my personal main usage for them, but one use that Shawn didn't list was to provide concrete implementations of interfaces that don't require any exposing any public members of their own. The main examples I can think of are IList/IDictionary/ICollection implementations where you provide some kind of specific storage or lazy load implementation. Really nobody ever needs to know about your internal guts and, unless you're into strongly typing all of yours IList implementations, there's no reason...

posted Monday, November 15, 2004 8:09 PM | Comments | Filed Under [ .NET ]

So I jumped into a discussion on microsoft.public.dotnet.framework.webservices where the author asked the best way to send DataSets over web services. One of the initial responses was basically (to paraphrase) “...just pass it as strings and use GetXml, ReadXml to dehydrate/rehydrate the DataSet...”. The author of said post has, IMHO, been trying to tap dance out of that statement, but he only seems to be digging himself deeper. Anway, I leave the reading of that thread up to you if you're interested. The real reason for this post is the ever increasing scenario where I see people recommending passing strings of...

posted Monday, November 15, 2004 2:11 PM | Comments | Filed Under [ .NET Web Services ]

Microsoft Research is at it again. They're working on an experimental language called Spec#. Generics used to be an MSR project, now they're one of the staples of .NET 2.0, so ya never know just which features of Spec# might be showing up in C# 3.0. Then again the famed data centric language features (X#/Xen/C-Omega) still haven't made the light of day.

posted Thursday, November 11, 2004 8:35 PM | Comments | Filed Under [ .NET ]

Ok, so the question in the title a little misleading... I actually know why it's abstract, but what I don't understand why it was designed that way. It forces me to always subclass it and add my own methods, decorated with SoapMethodAttribute, just so I can send a SoapEnvelope from client to server. What's lame about this is that all the information I need to send is in the SoapEnvelope already. I shouldn't need to pass it through some special method decorated with one attribute to set the SOAP action. I understand that this design is intended to simplify the strongly...

posted Sunday, October 31, 2004 8:35 PM | Comments | Filed Under [ .NET Web Services ]

The cat's out of the bag and the word is spreading like wildfire: Microsoft has added Edit and Continue to C# for VS2005. The VS/Framework developers are really knocking me over with their support for the community these days. I mean, I've always had good relationships with them and been able to affect minor features via feedback in betas I've participated in, but never have I seen something of this magnitude take place. That said, I don't honestly believe Edit and Continue would have been worth holding the release of the product up over. People seem to make a really big deal out of...

posted Friday, October 15, 2004 1:57 PM | Comments | Filed Under [ .NET ]

I've dealt with this before, but I'm bumping into it again so I figured I'd blog about it to vent a little... If you implement IXmlSerializable to customize the output of your type when it partakes in XML serialization, you can't even decorate it with XmlRootAttribute. This basically means that if your type is the root of an object graph that needs to be serialized you have to explicitly pass an instance of XmlRootAttribute to the XmlSerializer via a constructor overload. Umm... what if I want to just deal with IXmlSerializable types abstractly? How do I know what the heck I'm...

posted Wednesday, October 13, 2004 7:11 PM | Comments | Filed Under [ .NET ]

.NET XML API pundit, Daniel Cazzulino, has brought to light a bug in the way the Whidbey version of the XmlSerializer works with respect to fixed attribute values. If you used fixed values and expect them to be emmitted correctly to the instance document, I suggest you go vote this bug up. That said, I think I understand why they don't emit it. When you define a default value attribute in an XML Schema, it's pretty much like saying: "If an instance document does not specify an explicit value for this attribute, this is the value that people interpreting the instance document should use...

posted Sunday, October 03, 2004 10:40 AM | Comments | Filed Under [ .NET ]

I just entered a suggestion for the Whidbey .NET Framework. It has to do with adding a Disposed event to the SqlDataReader. Every other major class (SqlConnection, SqlCommand, SqlDataAdapter, etc.) in the System.Data.SqlClient namespace has a this event, so why not SqlDataReader. My personal reason for having it is that I have a data access layer which I'd like to hand SqlDataReader instances out from and I'd like to be able to track the disposal of those instances. If you think this is a good or bad idea or have any other suggestions, head over to LadyBug and make yourself...

posted Wednesday, September 22, 2004 7:59 PM | Comments | Filed Under [ .NET ]

Ok, so if you read this previous post, you'd know that I ran into a problem with ConfigXmlDocument not setting the BaseURI property making resolution of relative URIs within the document completely unpredictable and utterly useless. I really wanted it to work and knew there had to be a way, so I fgured out the following workaround (aka hack). public sealed class HackedConfigurationNodeReader : XmlNodeReader{    #region Fields    private string configurationFilePath;    #endregion    #region Constructors    public HackedConfigurationNodeReader(string configurationFilePath, XmlNode configurationNode) : base(configurationNode)    {        this.configurationFilePath = configurationFilePath;    }    #endregion    #region Base class overrides    public override string BaseURI    {        get        {            return this.configurationFilePath        }    }    #endregion} Now, all...

posted Monday, September 20, 2004 11:24 AM | Comments | Filed Under [ .NET ]

Here's a missing piece of functionality that's frustrating me right now: Basically, XmlDocument has a virtual property called BaseURI that subclasses can override to provide the base URI (go figure) from where the XmlDocument instance was loaded. In a normal XmlDocment, if you call the Load override specifying the “filename” parameter, it will set it's BaseURI to that. Also, if you Load the instance from an XmlReader that has it's BaseURI set it will inherit that. Anyway, my point is, the support is there in the base XmlDocument class. Now we come to ConfigXmlDocument, which subclasses XmlDocument to provide special behavior for loading...

posted Thursday, September 16, 2004 11:03 AM | Comments | Filed Under [ .NET ]

Ok, this is pretty crazy. I'm on XPSP2 and I've entered a ServiceDomain with a ServiceConfig that requires transactions with an IsolationLevel of Serializable. Now, I've done this a million times before and it works no problem. In the specific scenario I'm dealing with now, I'm seeing something completely insane. I've constructed a SqlConnection and I'm getting ready to Open it. Up until I call Open ContextUtil.IsInTransaction is true. Now I step over the call to Open and *bam* I've lost my COM+ context. ContextUtil.IsInTransaction is now false and any attempt to SetComplete or SetAbort throws: System.Runtime.InteropServices.COMException (0x8004E004): There is no...

posted Wednesday, September 01, 2004 3:53 PM | Comments | Filed Under [ .NET ]

Just passing on the word that VSTS should be available for download to MSDN subscribers starting tonight. I for one am super psyched to get my hands on these bits since I will finally have support for all the team based tasks I do on a daily basis baked right into my favorite development environment. Update: It's there, go get it... all 3.5gigs of it. :)

posted Tuesday, August 31, 2004 1:33 PM | Comments | Filed Under [ .NET ]

Looks like it shouldn't be too much longer before we can get our hands on a build of Visual Studio 2005 Team System. This is great news. Lots of people have been concerned that it wouldn't receive the same level of testing before it is released since it hasn't been part of previous community releases. While they are new features and will certainly need some testing to get the bugs out, they are more like extensions to the shell than anything else. The core of the Visual Studio 2005 product, not to mention .NET 2.0 runtime/framework, has been in the...

posted Wednesday, August 25, 2004 6:27 PM | Comments | Filed Under [ .NET ]

I was just doing my morning reading when I came across this post. I for one am really looking forward to this being baked right into VS. We've used ACT in the past, but Orcacoke seems like it's really stepping it up in terms of features and integration. Like most people, I can't wait to get my hands on a VSTS build.

posted Monday, August 23, 2004 9:23 AM | Comments | Filed Under [ .NET ]

I was catching up on my blog reading during lunch and came across this post from Mikhail Arkhipov who works for Microsoft. Apparently he is on the ASP.NET 2.0 team and is looking for suggestions on how to solve the problem of declaring instances of generic typesin "code-in-front". My suggestion is to strive for 100% XML comformity so that things can be parsed/generated more easily. Therefore, I would go with a custom attribute which is scoped to the ASP.NET schema namespace, like so: <myNs:MyGenericControl asp:genericParameters="TypeName1, TypeName2+SubTypeName" someTextProperty="Hello World!"/> Whatcha think? If you've got other suggestions, head over there and state your case in...

posted Thursday, August 19, 2004 10:13 AM | Comments | Filed Under [ .NET ]

We're doing some work right now with persistance of object graphs into a SQL server image field using the BinaryFormatter. We're using “simple” serialization, meaning we're just marking our types with the SerializableAttribute and whatever transient fields shouldn't be serialized we're marking with NonSerializedAttribute. I realize that this problem could be solved if we go and implement ISerializable ourselves, but... I'd rather talk about the issue at hand first. For starters, everything works 100% as advertised until you rebuild the assembly of the types that have been persisted. After a rebuild, upon deserialization of those objects you'll end up with a nice little SerializationException with the message: “Insufficient state to...

posted Monday, August 16, 2004 2:19 PM | Comments | Filed Under [ .NET ]