Galin Iliev's blog

Software Architecture & Development

VS2008 and .NET 3.5 (WCF, WPF, WF) Training Kit

Microsoft released a nice training kit for the latest technologies that will help you to become a real hero very quickly.

This package is a real treasure because it covers a bunch of technologies:

  • C# 3.0
  • VB 9.0
  • LINQ
  • WPF
  • WCF
  • WF
  • Silverlight
  • AJAX
  • CardSpace
  • Mobile
  • Visual Studio Tools for Office
  • Visual Studio Team System
  • Application Lifecycle Management

And the materials are of the different types:

  • Presentation - will be very helpful to prepare talks for community
  • Demos
  • Labs - very helpful to walk through new technologies in deep.

Go grab it!

How to kill C# 2.0 compiler

I found an interesting article on CodeProject: How to crash MS C# Compiler!.

These are interesting issues. I am not a compiler guy (meaning I do not write compilers) but still it is interesting.

Case 1 - ++ operator overload
   1: public class TestClass
   2: {
   3: public static TestClass operator ++(TestClass ts)
   4: {
   5:     return new TestClass();
   6: }
   7: }
   9: public class MyTest
  10: {
  11: public TestClass TestProperty
  12: {
  13:     get
  14:     {
  15:         return new TestClass();
  16:     }
  17: }
  19: public void BadMethod()
  20: {
  21:     TestProperty++; // <-- PROBLEM HERE
  22: }
Case 2 - null array
   1: void SomeMethod()
   2: {
   3:     //const AnyType[] X = null;
   4:     const int[] X = null;
   5: }
Case 3 - Attribute with delegate
   1: public delegate void Proc();
   2: public class CrashAndBurnAttribute : System.Attribute
   3: {
   4:     public CrashAndBurnAttribute(Proc p)
   5:     { }
   6: }
   8: public class CrashAndBurnClient
   9: {
  10:     [CrashAndBurn(delegate { return; })]
  11:     public void Foo()
  12:     {
  13:     }
  14: }

Who needs to write such statements!?

Learn C# 3.0 by solving interesting problems

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

Bill Wagner started solving them employing new C# 3.0 features and post them in MSDN Code Library.

Follow his blog post series to learn them.

Of course it is preferable to try to solve them by yourself in order to tease your brain :)

IIS7 Admin Packs add analytics features

IIS7 is grew to a development platform and become the most wanted feature in the new Windows Server 2008. But this is not the end - IIS7 Admin Pack first CTP is here and provides a nice set of features that can help you to understand what is happening on the server...

here are new features in short:

  • Database Manager: Built-in SQL Server database management, including the ability to create, delete, and edit tables and indexes, create/edit SPROCs and execute custom queries.  Because it is integrated in the IIS administration tool it all works over HTTP/SSL - which means you can use the module to remotely manage your hosted applications (even with low-cost shared hosting accounts), without having to expose your database directly on the Internet.

  • Log Reports: Built-in report visualization with charting support for log files data.  Full range selection and custom chart creation is supported, as well as the ability to print or save reports.  Like the database manager you can use this module remotely over HTTP/SSL - which means it works in remote shared hosting scenarios.

  • Configuration Editor: This is a power module that provides complete control over editing all web.config settings within the admin tool.  You can configure it to track the changes you make using the UI and have it auto-generate configuration change scripts that you can then save and tweak to re-run later in an automated way.

  • Request Filtering UI: This admin module provides more control over the new request filtering feature in IIS7.  Check out Carlos' blog post here for details on how to use it.

  • .NET Authorization: This admin module provides a custom authorization rules editor which allows you to more easily manage the ASP.NET <authorization> configuration section.

  • FastCGI UI: This admin module provides more support for editing all the new <fastCGI> settings (for when you use FastCGI modules with IIS7 like PHP).


While DB manager can save you time jumping between applications Log Reports definitely rocks. It gives you an option to view activities on the server in very convenient form in following categories:

  • Web Server\Status code:  This report gives the comparison between number of hits and status code.
  • Web Server\Hits Per Url: This report gives the comparison between number of hits and the Url.
  • Web Server\Hits By Hour: This report gives the comparison between number of hits and the Hour.
  • Web Server\User Agent: This report gives the comparison between number of hits and the User Agent.
  • Web Server\File Extension: This report gives the comparison between number of hits and the file extension.
  • Web Server\User: This report gives the comparison between number of hits and the User.
  • Web Server\Time Taken: This report gives the comparison between Average time taken and the Url.
  • Web Server\Win32 Errors: This report gives the comparison between Hits and the Win32 Errors.
  • Web Server\Client Machine: This report gives the comparison between Hits and the Client Machine.
  • Web Server\Http Method: This report gives the comparison between Hits and the Http Method.

Just see these screenshots:

For more info visit these links:

Outsource your own job :)

I've just read an interesting article on The Micro-Multinational

And the story begins with a programmer in US who outsourced his own job to a guy in India. The magazine says this is "all win" situation because:

By subcontracting out the generic parts of his job, the programmer gives himself a promotion. The Indian developer is well paid. The employer gets good code.

I would strongly disagree: at least the employer gets code with a delay because of additional communication between a US programmer and the one in India.

I am also strongly for outsourcing as long as it put a brilliant people together to create a better product. But the quality should not suffer. Also it is not very loyal to keep this as a secret to the management because delays should be considered in the estimations (which are hard enough to create :) in software business ).

How big is .NET Framework!?

.NET Framework become a blockbuster right after it's release for many reasons. Part of them are:

  • good architecture
  • unified dev style independent from the application type
  • consistent API
  • constantly improved APIs and libraries that solves most common tasks and minimize doing same thing over and over again (take for example writing WinForms application with VC++ 6.0 - there you had to write code for the window and buttons; you had to call a method just to move data from variables to UI controls and vice versa)

This comes with the price - the price of the size!

3-4 year ago it was possible for one to cover all aspects of dev types. For instance I still have no time to ramp up with .NET 3.0 (WF, WCF, WPF, Cardspace) although I had some basic ideas about it but still nothing in production. The funny part is that I am very acknowledged with .NET 3.5 (even wrote a tutorial ;) )

Is it huge or I am getting old???

This is how big is .NET Framework in numbers:

I feel this when beginner devs are asking me where to start from.

Thanks, Brad for this interesting info! Brad Abrams asked in his post: "Any guesses on how many types will be in .NET Framework 4.0?"

IIS7 supports media streaming through new module

IIS7 team released a new module that will optimize the work and bandwidth usage of media serving sites

Imagine this scenario - a client connects to your video site, clicks on your featured video, watches 5 seconds of it to realize they have no interest in watching further, and move on to the next video.

In those 5 seconds, the server could have sent out 5 minutes worth of the video, and you paid for 5 minutes worth of bandwidth. With the bit-rate throttler + media bitrate detection, the server would only end up sending a little over 5 seconds worth, and you would end up paying only for what was used.


Download links:
- 32 bit -
- 64 bit -

Read full blog post of the daddy of this project.

Update:ScottGu posted a more detailed post on his blog covering this module with some screenshots

The below whitepapers describe how to enable and use it more:

ADO.NET Data Services Framework samples

As project codename Astoria has new name "ADO.NET Data Services Framework " and it is part of ASP.NET 3.5 a.k.a ASP.NET futures it has its place on site.

There are plenty of samples and descriptions what is it and how to use from client and server site.

If you struggle what is REST and how it is different than well known web services  take a look at this web presentation: Reconciling Web Services and REST Services.

Microsoft DevDays 2008 in April

The registration for the biggest annual event for developers in IT pros in Bulgaria is open. It will be held in International Exhibition Center - Sofia, Bulgaria. For second year in row it is paid event but the price is very low for the knowledge one can gain - it is just 50 EUR.

I am going to present two sessions: LINQ to XML - Data Access Technologies and IIS7 for Administrators.

If you're particularly interested in some details drop me a line and I will try to cover it. In case it is too specific to present we can chat after the session.

Almost forgot: The event will take place at April 24th and 25th 2008.

See you there!