Friday, July 27, 2007

unicode.pngAt least we had. One of our customers reported a strange error in one of our web app’s running .Net 2.0. They got an error message after calling a web service (running on .Net 1.1) in the web app (.Net 2.0) and we just couldn’t figure it out.  We and our customer started to investigate and our customer found that after uninstalling the Security Update for .Net 2.0 (KB928365) things started to work again! Nice work customer!

We started to investigate what caused the problem and found that one week ago we had found an error related to parsing Unicode. The problem is related to how the framework (or rather UTF8Encoding class) handles invalid bytes (see KB940521), only we didn't know that at the time. Here’s the short version of the KB article:

…the behavior of the UTF8Encoding class, the UnicodeEncoding class, and the UTF32Encoding class changes to comply with the Unicode 5.0 requirements for Unicode encodings. Invalid bytes are not removed. Instead, the invalid bytes are replaced by the Unicode character U+FFFD.

We had an invalid byte in the beginning of one of our xml documents that we manually created and returned as a string using UTF8Encoding. Don’t ask why we parse it to string; its old code that we haven’t replaced with XmlNode yet. Since this is now (in 2.0 with security update) replaced as a Unicode character it uses more space and we had to remove more bytes. Since this class was written in .Net 1.1 but is also used in 2.0, we made a quick fix for checking which framework and change the behavior accordingly. The KB articles states:

Earlier versions of the .NET Framework 2.0 followed the latest available Unicode standard, Unicode 4.1. The specifications for Unicode 4.1 disallowed the passing of invalid UTF code points. Any invalid data that was encountered was dropped. This behavior was considered to have minimal effect on current programs.

And then:

Before this change, invalid characters in the middle of text strings would be silently removed. For example, the string "Ad\xD800min\xDC00istrator" would change to "Administrator" because the Unicode characters U+D800 and U+DC00 are invalid. This could cause a security problem for some programs. After you install security bulletin MS07-040, this string now becomes "Ad\xFFFDmin\xFFFDistrator." This string is decoded to "Ad�min�istrator," where the � is the Unicode replacement character.

 So if you have the same “bad” code or are using Unicode encodings with invalid bytes somewhere you might experience the same problem and hopefully this would be of help.

Friday, July 27, 2007 3:21:43 PM (W. Europe Daylight Time, UTC+02:00)
 Thursday, July 12, 2007
Yes, it’s important to distinguish between the two. At the partner conference in Denver Kim Saunders (Senior Director, SQL Server Marketing) said that they launch SQL Server 2008 in February, but the actual release will be in Q2. And by launching they mean that they have all the marketing material and the final product information, but not the product.

As for Visual Studio and Windows Server I have not yet heard anything similar, so I'm still thinking 27th for these.
Thursday, July 12, 2007 4:10:11 PM (W. Europe Daylight Time, UTC+02:00)

I'm in Denver at Microsoft World Wide Partner Conference, and I find it strange. The conference itself is not strange, but it's strange for me. I'm a developer/architect and not a sales guy. I'm used to devcons where the primary purpose is not to interact with as many people as possible, but to get your hands on as much information as physically possible. Here it's a total different game. The sessions are just not the most important. Making connections and meeting up with people you've been matched with by the conferencing tool is!

The first day I was the only attendant from my company since our COO arrived later that day. Because of this I was supposed to set up some meetings with potential partners. I just have to admit that this is so not me! So this brings up the question; what am I doing here really?

When I first got the opportunity to attend this conference my first thought was that this was not for me, but when I looked at the agenda and started to read a bit more about the conference I changed my mind. This was really an opportunity to get a different view of Microsoft technology and set it in another perspective. I think most devcons focus on the how, but at the partner conference its more the why.

Another difference with this conference is that there are actually women here! We tech guys are not spoiled with having many women on our conferences and I think that is really bad. I notice right away that this conference has a different tune to it just because of the mixed gender.

To sum it up I (surprisingly) can recommend this conference for tech people as well because of the overview you’ll get of the technology, but be prepared and bring your social skills! And don’t expect 400 lectures...

Thursday, July 12, 2007 3:42:31 PM (W. Europe Daylight Time, UTC+02:00)
 Tuesday, July 10, 2007

Update: At TechEd Barcelona Microsoft announced today (2007-11-05) that Visual Studio 2008 and .Net Framework 3.5 will release in late November. See the official press release here: http://www.microsoft.com/presspass/press/2007/nov07/11-05TechEdDevelopersPR.mspx


I’m at the Microsoft Partner Conference in Devner where Microsoft just announced the release date for Visual Studio 2008, SQL Server 2008 and Windows Server 2008. Look forward to February 27!

Tuesday, July 10, 2007 9:11:44 PM (W. Europe Daylight Time, UTC+02:00)
 Wednesday, July 04, 2007
ComPlus.jpgEver been annoyed by not being able to find the real object behind System.__ComObject? There is a solution and guess what; it's VB.Net (or at least the VB API)! Carlos has a how-to article that explains the solution. In essence you just have to have a reference (if you're running C# or a non VB language) to Microsoft.VisualBasic.dll. You can then use Microsoft.VisualBasic.Information.TypeName(someObject) to get the info you want. Thanks to Pablo Galiano for his blog post on this.

.Net | CSharp
Wednesday, July 04, 2007 10:47:07 AM (W. Europe Daylight Time, UTC+02:00)
 Monday, July 02, 2007
DestroyAllInvadersSmaller.jpgJust found a Silverlight game that uses Virtual Earth as a backdrop for a helicopter chasing alien invaders. Check out the game here: http://www.andybeaulieu.com/silverlight/DestroyAll/Default.html

Want to hack yourself? You'll find the source for the game here: http://www.andybeaulieu.com/Home/tabid/67/EntryID/75/Default.aspx

The game is created by Andy Beaulieu.

Monday, July 02, 2007 4:46:34 PM (W. Europe Daylight Time, UTC+02:00)
 
Aggregate Me!
Feed your aggregator (RSS 2.0)  Rss
Locations of visitors to this page