
Back to Blog index.
I've recently agreed with Jupitermedia to publish my articles on their high-traffic developer sites Developer.com and CodeGuru.com. I'm happy to announce that they've published my first article, titled "Cryptographic Solutions for .NET Developers: Hashing and Encryption". Since Jupitermedia publishes content on multiple sites, the article is available for free on both Developer.com and CodeGuru.com. The article talks about cryptography, and teaches how developes can use the .NET classes to encrypt and decrypt data and calculate hash values using C#.
As a side note, I've also updated my Publications page to reflect this new publisher. Enjoy, and stay tuned for more articles!
Microsoft has announced the availability of Beta 2 of Visual Studio 2008 and .NET Framework 3.5. Sounds good! The beta is a public one, and can be downloaded here. The bits are also available on MSDN, and available as DVD images and Virtual PC images for easy testing. Also available is an white paper about the new features in this 9.0 version of Visual Studio. Download the XPS version titled "An Overview of Microsoft Visual Studio code name Orcas" here.

I'm installing my copy on Windows Server 2008 Beta 3 as I write. :-) Remember to give your feedback on Connect!
Sometimes, I have hard time to remember all those communities Microsoft has created on the web. For example, there's MSDN (of course), Channel 9, TechNet, CodeZone, and so forth. Luckily, I found by chance a web site that lists them all: mscommunities.com. Here's a quick rundown of the current sites:
I only wish that there was a single RSS feed to have the best topics of all these forums/communities in one!
Intel Software announced two days ago that its commercial Threading Building Blocks (TBB) product has been made available as an open-source project. A new web site has been formed to host the source code, and versions now exist for Windows, Linux and Mac under the GPL license version 2 with the "runtime exception".
From Windows compilers, Microsoft Visual C++ version 2003 and 2005 (7.1 and 8.0) are supported. Download your copy of the TBB package here.
There's a recent blog post in Borland/CodeGear's blog about the next version of Delphi, and what's included and what's not. One thing that alarms me is that CodeGear has made the decision to drop WinForms supports from it's fortcoming Delphi version. An interesting decision to say the least.
Of course, many Delphi fans say that it's a good move to focus on where Delphi is the best, i.e. native Win32 world. However, I believe for ordinary business applications, .NET is the future. The VCL library is in my opinion lacking in many areas that are now common needs in business applications, for example database support (SQL Server's advanced features), XML manipulation (where's my XPath?), cryptography, and general convenience of manipulating files and directories, for example. I'm not saying VCL cannot be used, in fact it can do marvellous things, but it cannot compete with the huge .NET libraries. Yes, it is indeed possible to use all these from VCL.NET applications, but I don't want to use VCL libraries in .NET if I can avoid that.
Why? Because my world has changed. In the Win32 world, I could use Delphi alone, because it was enough for my needs. But when .NET came along, I learned Visual Studio, and now suddenly I need to use both Delphi and Visual Studio. For me, learning one GUI library (read: WinForms) would be the optimal solution. Now I do have to remember two: VCL and WinForms.
For developers using Delphi only, making the growth-path from VCL to VCL.NET easy is a key in moving Delphi developers to the .NET world. However, those who have already started using Visual Studio for (some of) their projects, will quickly notice the differences between the IDEs, for example stability and productivity. Even though concentrating resources and R&D efforts is a good thing for CodeGear, in my eyes it's pretty much the same as declaring the "war" lost to Visual Studio. And what I'm missing is competition in .NET development tools.
Last week, I was debugging a Delphi for .NET application (using .NET 1.1) that reads data from a database, and sends e-mail with the System.Web.Mail.SmtpMail class depending on the data. Now, when I called the static Send method (or should I say, class method) of the SmtpMail class, I always got the following error:
System.Web.HttpException: Could not access 'CDO.Message' object.
---> System.ArgumentException: Value does not fall within the expected range.
at System.Web.Mail.LateBoundAccessHelper.SetProp(Type type,
Object obj, String propName, Object propValue)
at System.Web.Mail.LateBoundAccessHelper.SetProp(Object obj,
String propName, Object propValue)
The application has been working for years with the exact same code, and now suddenly it started to fail. I tried naturally googling (or rather, "liveing" as I use Live.com most often nowadays) for the error, but most referred to invalid registration of CDOSYS.DLL, but those tips (all nine, in fact) were not helpful in my case.
Luckily, I solved the issue. There was something strange (something I've not pinpointed yet) in the database access in Borland's BDP.NET drivers, and they returned database data with about 10 KB of null characters appended to the database data. This caused the CDO components that the SmtpMail class uses to fail with the above error message. I simply converted the null characters into spaces and then trimmed the string, and thus the problem was solved.
Note that it was difficult to find out about the null characters in the first place; Delphi's debugger stopped showing the string data up to the first null character. I only figured out about this when I started comparing String.Length to the actual contents of the string. Beware!
Letting a recent Windows operating system, say, Windows XP SP2 update itself is very easy: just make sure you have those automatic updates enabled, and you are all set. Or are you? It turns out that especially with Windows XP, there's one manual step that you need to do. In the process, you might also become confused with the different terms.
Originally, Microsoft developed a web site called Windows Update, which, as it's name suggests, lets you update your Windows operating system components and those accessory applications that come with it (for instance, Internet Explorer and Media Player). But the problem is that common Microsoft applications such as Office, SQL Server or Visual Studio are not receiving automatic updates in Windows XP. With Windows Vista and forth-coming Window Server 2008, the situation is different, and you don't need to worry about this. So, the following only applies to Windows XP (SP2).
If you try to bring Office, Visual Studio and so forth to be part of the automatic updates, you can find it difficult to find the correct information. But the key is this: you have to learn that there's also a new service called Microsoft Update that is the version 6 of the older Windows Update that Windows XP uses by default. Now, Microsoft Update updates many common Microsoft products like Office, whereas Windows Update only updates Windows components. So, you need to replace Windows Update with Microsoft Update.
To do this, simply go to the Microsoft Update site, and follow the instructions. Once you are through, Windows XP's Automatic Updates will start using Microsoft Update instead of Windows Update, although this cannot be seen from the Automatic Updates user interface, as far as I'm aware (Control Panel/System/Automatic Updates). If you need to revert back to the older Windows Update, follow the instructions in KB article 901037. There's also a FAQ available. Good luck!
As mentioned by the product pages and a blog entry, Windows Home Server is now ready.
In addition to the product, MSDN also features the newly released SDK for the product.
Finally, since it can be somewhat difficult to get a hold of what the Home Server really is, Microsoft has written a Reviewer's Guide, available as a PDF document.
A nice packet was waiting on my desk at the office when I today returned from my three-week summer vacation. Inside was a brand-new Samsung SGH-I600 smartphone, running Windows Mobile 5.0! Great, now I can finally start developing apps for the platform and not rely on emulators for all testing. Thanks JP!
I today had the chance (staying inside to stay out of trouble on this day :-) to play a bit with Windows System State Analyzer, which is currently in beta (as per the application title). I installed it on Longhorn/Windows Server 2008 beta (build 6001, beta 3). Installation went fine, and the application is a .NET application.

However, the application fails to take a snapshot on the beta. I can start the application and begin taking the snapshot, but after several minutes (yes, it takes quite a while), I get an error saying this:
--------------------------- Windows® System State Analyzer (Beta) --------------------------- Error taking snapshot. --------------------------- OK ---------------------------
I have to check whether the application would work, say, on Windows XP.
I just read from Microsoft's web site that next "2008" versions of no less than Windows Server, SQL Server and Visual Studio will be launched on February 27, 2008 in Los Angeles. The announcement was made at the Microsoft Worldwide Partner Conference 2007 in Denver.
According to eWeek, the launch will be Microsoft's biggest, even surpassing the Vista+Office+Exchange launch in January this year. Sounds interesting, because the January launch was already BIG! If the launch date is in February, the chances are that the bits would be ready a month of two before, so that the finished products could be downloaded from MSDN. Cool.
Earlier today I blogged about the new ListView component for ASP.NET developers in forthcoming .NET 3.5. In addition to the major enhancements like C# 3.0 and LINQ, the 3.5 version also brings many interesting smaller additions to the framework class library. One of these is the support to Vista's Peer-To-Peer APIs. This brings up the new namespaces System.Net.PeerToPeer and System.Net.PeerToPeer.Collaboration. To use these new APIs for example from Visual Studio 2008 March CTP, you need to start a project and then reference the following assembly:
C:\Windows\Microsoft.NET\Framework\v3.5.20404\System.Net.dll
A screenshot from Windows Server 2008 beta showing the assembly:

Note that you won't find the name of this assembly from the initial list provided by the Add Reference dialog box, but if you go to the Browse tab, you can select the above path and pick System.Net.dll from there. Good luck!
If you are a ASP.NET web developer and are using Visual Studio, the good news is that with Visual Studio 2008 and .NET Framework 3.5, there's going to be a new component (control) named ListView. This new component combines the best parts of the older GridView and DataGrid components, and can even replace the older Repeater component.
There's a Microsoft previously linked specification document available (in XPS format, more Orcas specifications here), and also a short WMV video that shows how the component works. Note that this new ListView control has nothing to do with the WinForms ListView control that has existed since .NET 1.0.
I got an e-mail from a reader of my C# blog entry asking what does the construct "bool @this = true;" mean. Here's an answer.
In C#, there are about 80 keywords, that cannot be used as identifiers. However, by placing the at sign @ in front of an identifier name creates a so-called "verbatim identifier". This construct allows you to use C# keywords as identifier names. As said in the C# Language Specification, section 2.4.2:
"The prefix '@' enables the use of keywords as identifiers, which is useful when interfacing with other programming languages. The character @ is not actually part of the identifier, so the identifier might be seen in other languages as a normal identifier, without the prefix."
Of course, the other use of the @ sign in C# is the more common verbatim string use. This allows you to prefix string literals with the @ sign, and not espace characters such as backslashes (\). This is very useful for example when working with pathnames.
Well, I bought a nice white light tent from Lumisoft, and once I opened the small soft case, the tent popped up like a thing on spring. Great, but little scary now that I think it afterwards. In any case, the tent works perfectly, and I'm waiting to find more time to take more test shots.
But the biggest problem so far was to store the 60x60x60 cm tent back to the small pouch. I tried twisting the thing many times, but without luck -- no instructions were given. Luckily, I found a video on YouTube (ID eER8hhhg28othat) that demonstrates the process. :-) It's a bit hard work still and requires some forcing, but in the end I managed to solve the problem.
Keywords: howto, light tent, folding instructions, fold light tent.
MSDN has opened a new Small Business Developer Center which is a collection of videos and example applications to support SMB companies in their most common data processing needs: system/data integration, reporting, and moving applications to the web. Go check it out!
PS. Happy July 4th to those in USA!
You might be aware that many third-party tools integrate already today into the Visual Studio IDE, such as products from Borland and Compuware. Now, with the forth-coming Visual Studio 2008, Microsoft is taking the integration possibilities even further with the introduction of the Visual Studio Shell.
From the page: "Visual Studio Shell provides the core foundation so you can focus on building your application’s unique features. Flexible customization options help you deliver optimized experiences for specific markets."
Sounds very good to me, except that if for example CodeGear would choose to go this route with their Windows IDEs, then that would be more or less the end to the IDE competition.
I found an interesting tool on the Microsoft's new "Innovate on Windows Server" site: the Windows System State Analyzer Tool. I confess that I haven't heard of this tool before. But it sure sounds useful if I read it right: "Users can create two snapshots at different points in time and compare them to view differences. A detailed report could be generated at the end of a compare operation." If that works, it will solve many mysterious issues! I have to download and test it immediately.
› Blog Archive