September 2006 - Posts
Since last night's upgrade, BloggingAbout.NET supports Windows Live Writer 100%. And I really love writing new articles with WLW, especially now it can automatically 'upload' images as well. Here are the steps to take when you want to join in on the fun.
- Download and install Windows Live Writer. Latest version is currently here.
- When starting WLW for the first time, you don't have to tell what weblog system you're using, just fill in where your weblog is located, as well as your credentials, like shown here :
- WLW will now detect that you're using Community Server and will try to download your weblog style. Try, because it seema to fail a lot, although we're not the only one with the problem here at BloggingAbout.NET. I have no idea if it's a Live Writer or Community Server problem. But after registering, you can try to download it another time through "view" and "Update weblog style..."
- Now just start writing and adding images to your posts.
Isn't being a weblogger fun? Especially on BloggingAbout.NET. Mike? Alex? :-)
Until a few hours ago, BloggingAbout.NET ran on ASP.NET 1.1. For multiple reasons I wanted to upgrade to ASP.NET 2.0, one of them being that most Community Server addons are released ASP.NET 2.0 only. So I've created an exact copy of BloggingAbout.NET on my laptop and prepared the upgrade. And although I've taken the time to prepare everything I had some problems uploading all the files.
CS 2.1 consists of over 5000 files. So I created an entire backup just before the upgrade and deleted everything but a few folders. I really wanted a clean install as I've been ugrading and adding files since .Text or so. Then I tried to upload all files, but after 2500 files, the rest just kept failing. I still have no idea what it was, but I tried again after restarting my ftp client and it worked. I just hope I haven't missed any file.
Anyway, perhaps I can help people out with their upgrade. You might want to prepare already, because Community Server 3.0 is only going to be available in ASP.NET 2.0. Here are the steps to take:
- Backup your website
- Backup your database
- Upload an app_offline.htm file.
This is a new ASP.NET 2.0 option. When it finds this file, it shows it on every page. I placed a message about BloggingAbout.NET being under maintenance.
- Change the ASP.NET version to 2.0.
Immediatly your site will go offline, because of the file uploaded in the previous step.
- Delete all folders except:
- I also had a directory where weblog owners store their images, a \temp\ folder and a folder where files are being stored for activity reports and such.
- Remember to adjust the web.config connectionstrings to the correct database.
- Upload all the files.
- Rename app_offline.htm to some other name, so next time you'll be able to use it again.
That's exactly what I have done, although step 8 took a little longer than expected. Everything worked like a charm from the first start. New features I've added are the ReallySimpleDiscoveryHandler and new MetaWeblogHandler by Robert McLaws, although I've modified the source so files are uploaded in a different folder. Also the fact that the original was packed together with a few other addons, is something I don't really like, so I created a completely new assembly. From day one, Dave Burk has requested the configurable imagedump folder, but Robert hasn't added this yet. Perhaps I'll do this and release the modified addon myself. So Robert, if you read this, please beat me to it! :)
When you think hundreds of weblogs are going to blog about the new release of Windows Live Writer, Somasegar shares some info on Windows Vista that causes a lot of stress in the .NET blogging community. And I think they're quite right, because as Frans sums it up:
- Visual Basic 6 runtime and IDE. Supported.
- Visual Studio.NET 2002. Not supported
- Visual Studio.NET 2003. Not supported
- Visual Studio.NET 2005. Supported with SP1 (now in beta) and you've to shut down UAC, till they've fixed that after Vista ships.
That's quite ridiculous! It has been a long time since I've done something in .NET 1.1 but at Class-A we still train people in it, because of various reasons. So I do have Visual Studio 2003 installed. But installing Windows Vista makes sure, as it seems, that installing Visual Studio 2003 isn't necessary as it just won't work! How weird.
I hope someone can tell us that VS2003 actually does work, but seeing the number of comments on Somasegar's post I don't think I have to set my expectations too high.
Update : Here's a quote from Scott Guthrie on Paul Wilson's weblog:
The big technical challenge is with enabling scenarios like advanced debugging. Debuggers are incredibly invasive in a process, and so changes in how an OS handles memory layout can have big impacts on it. Vista did a lot of work in this release to tighten security and lock down process/memory usage - which is what is affecting both the VS debugger, as well as every other debugger out there. Since the VS debugger is particularly rich (multi-language, managed/native interop, COM + Jscript integration, etc) - it will need additional work to fully support all scenarios on Vista. That is also the reason we are releasing a special servicing release after VS 2005 SP1 specific to Vista - to make sure everything (and especially debugging and profiling) work in all scenarios. It is actually several man-months of work (we've had a team working on this for quite awhile). Note that the .NET 1.1 (and ASP.NET 1.1) is fully supported at runtime on Vista. VS 2003 will mostly work on Vista. What we are saying, though, is that there will be some scenarios where VS 2003 doesn't work (or work well) on Vista - hence the reason it isn't a supported scenario. Instead, we recommend using a VPC/VM image for VS 2003 development to ensure 100% compat. Hope this helps - even if the answer isn't entirely what we'd all like it to be, Scott
I've blogged about the .NET 2.0 System.Transactions namespace before (toc at the bottom of this post), letting you know that in almost no circumstances, the Lightweight Transaction Manager (LTM) will be used. When you can't use distributed transactions for some reason, or don't want the performance penalty, System.Transactions isn't a choice. It's really sad so little people mention this when talking about the TransactionScope.
Here's example code again on when your transaction gets promoted to MSDTC:
string ConnectionString = @"data source=.;datasource=Logs;integrated security=SSPI;";
using (TransactionScope scope = new TransactionScope())
using (SqlConnection conn1 = new SqlConnection(ConnectionString))
SqlCommand cmd1 = new SqlCommand("insert into LogFile(Message) Values ('This creates a new row')", conn1);
using (SqlConnection conn2 = new SqlConnection(ConnectionString))
SqlCommand cmd2 = new SqlCommand("insert into LogFile(Message) Values ('This creates a new row')", conn2);
conn2.Open(); // Promotion to MSDTC occurs!
Now for the performance part, recently I found a post by Nate Moch about the difference between ADO.NET and System.Transactions. He says using the TransactionScope on SQL-Server 2005 with a local transaction delivers 94% of the performance of an ADO.NET transaction. When you're promoted to a distributed transaction, "you should be able to get System.Transactions to perform at 56% of the performance of ADO.Net transactions directly."
Mind the bold part "should be able".
So what are your other options if you don't want or can't use System.Transactions?
- Enterprise Services
For many not really an option. On class level you have to configure if you want to join the running transaction and your class has to inherit from the SerivcedComponent class.
- T-SQL Transactions
Of course you can always start transactions in your Stored Procedure with BEGIN TRANSACTION. Not very flexible though and in your code you have no idea what's happening in your database. Other dbms have of course their own ways of achieving this. Delivers best performance.
- ADO.NET Transactions
Within ADO.NET you can create connections with your SqlConnection object with the BeginTransaction method. Normally however you'd be using multiple classes and methods to execute commands on your database. Enlisting all these commands in the created transaction, you'll have to pass either the connection or Transaction object to every method. This doesn't deserve a price for best design.
In the background, this is exactly the same as option 2, the T-SQL Transaction. The difference is that you can use the transaction over multiple Stored Procedures (or inline queries). Performance is great, as in option 2.
- Your own implementation
Of course you can always implement something yourself, but this is much more complex and might not always be a good solution.
But what are the benefits of the TransactionScope?
- Anywhere in your code you can start the transaction. It's also a very clean and clear solution.
- Within a using statement, your transaction will always be rolled back when an error occurs and the Complete() method hasn't been reached.
- Database code doesn't have to be aware of the transaction code. If required, it still can.
- Multiple DBMS can easily enlist in the transaction.
- A lot more than your database actions can enlist in the transaction. Think files, registry, variables, etc.
- The problem with promotion to MSDTC with the exact same connectionstring will be fixed. No one can tell when however.
- Microsoft and especially Windows Communication Foundation use System.Transactions heavily. It's really the way to go for the future.
So when you don't have to worry about the 50% performance loss, or you know you (might) need distributed transactions, System.Transactions is the right choice. When you really have to care about performance, it might not be the right choice.
For everyone else, I advice to setup some test project and see what has to be done for the four above mentioned alternatives. When you need to inherit from a specific class, or you can't pass along the connection object, System.Transactions is probably your only good alternative.
When in doubt, just use System.Transactions. When looking at the last list, I think it's a good option. Especially considering the alternatives.
Table of contents
- An introduction
- Unit Testing
- Promotable Enlistment
- What to choose?
Last time, only 1000 keys were available. So everyone had to wait until the program opened up again. Good news, it's open again!
And while Erwyn is away, who normally posts these kind of things, I took it upon me to tell you the news. Perhaps you want one, and you can't be too late again!
Go to the country selection screen, and be sure to work with the bottom combobox.
Although I've written articles for magazines before, it had never crossed my mind to create an article about a technological subject. Because of the RAD Race held this year, the general editor of Software Release Magazine knew we had used LLBLGen Pro to help in our solution. So when version 2.0 was released of LLBLGen Pro, they asked us at Class-A to write an article about it. As I had just performed a review of several O/RM tools for a customer, it was most logical for me to write the article.
It turns out to be pretty hard writing an objective article about a tool. Because I didn't want to compare it to other mappers, I decided to write about how LLBLGen Pro works and about some of its coolest features. For example the designer that I haven't been able to discover in any other mapper. Besides the tool itself, I think support however is one of the most important aspects in choosing a tool like an O/R Mapper. And compared to others, it's my opinion LLBLGen Pro has the best support available. Other (not to be named) popular mappers have support, but you'll either have to pay big money for it (without knowing how good the support will be), or depend on one person to answer all your questions on the tool's forum. LLBLGen Pro on the other hand has a very active forum with a support-team and other users that answer questions pretty quick. And knowing Frans (founder of the tool) personally has helped me out on occasion as well. ;-)
Unfortunately the article isn't available online and in Dutch. For our Dutch reviewers, we hope to put the article online at some time on our company's website. When that'll happen, I'll inform you via my weblog. Here's a snippet from the magazine, as I suspect it won't stay online for more than a month.
Object-Relational Mapping in de .NET-wereld
Dennis van der Stelt
Een keuze maken tussen de vele O/R Mappers beschikbaar in de .NET wereld is niet eenvoudig. Als kennisprovider heeft Class-A daarom onlangs een onderzoek gedaan naar verschillende O/R Mappers. Hoewel niet voor elke project dezelfde keuze gemaakt kan worden, sprong één O/R Mapper tussen de andere uit: LLBLGen Pro 2.
I don't write about politics much, but this I cannot deny. I just saw a flash movie about photos that were in some way altered to make the scenes more dramatic. Adding more smoke into a photo, showing a shot-down Israelian plane in a photo, that is actually a waste-dump with burning tires or even worse. The quote on the end
If you don't read the newspaper, you are uninformed.
If you do read the newspaper, you are misinformed.
Just think about that! News should be objective, but also in my country I've witnessed the news being less and less objective, towards plain hostility towards nations, religions, etc. It's not enough that people already hate eachother, but the media has to throw some gas on the fire as well.
Watch the video here...
It's been long, very long since we've heard something about Team Fortress 2. The first Team Fortress was build on top of the original Quake, or Quakeworld actually. The developers were working on Team Fortress 2 when they joined Half-Life, and they ported Team Fortress to the Half-Life engine. The fact that Half-Life was build on top of Quake, probably helped.
Then Team Fortress 2 : Brotherhood of Arms was announced. Features I was amazed about were the fact that, when you were strafing, your body was running forward, but your head turned the way you were looking. Also volumetric fog was very promising, where a smoke grenade would case thicker smoke inside a small room than outside in the open. A very cool feature would be where spies would be able to listen-in on the teamspeak between members of the opposing force when he was close enough. That was 1998 and everything went silent on TF2.
Exactly 9 years later, during the July 2006 EA Press Conference, Valve revealed that Team Fortress 2 would ship with Half-Life 2 : Episode Two. Finally news about the game!
Mostly new is the cartoonish style Valve has used to give the game its own look. While few screenshots have been released, trailers have been released to show the different ingame classes that can be played. I can't wait until this game is released, especially since Half-Life : Episode Two will contain a really great new (in-game) technology called The Portal.