Archive for November, 2006

Virtual Windows Servers

November 26, 2006

About a year ago I bought two different Windows Server “Root” packages from two different companies. Actually I started off with the vServer Medium package from Server4you.de. But it took them over two months to give me access to the server after ordering it, they certainly have some of the worst support staff I’ve ever seen and I really needed a server fast, so I additionally decided to buy a Virtual Server Windows L package from 1&1. They supplied the server in less than a week, the support was great from the beginning (but I’ve been a happy customer for ages, so I wasn’t really expecting anything else).

After Server4you finally delivered and sent me access details to the server, I made a mistake. I logged-in to the server to check what I was in for. Why a mistake? Well there is a bit of german law that allows you to test a product you order on the internet for two weeks and if you don’t like it you can send it back and cancel the contract. If you break it, or create additional costs then the case changes, you can’t give it back. Now if you ask me, logging in to a server and looking what’s on the system qualifies for me as “testing the system”, but the fact it you are actually causing costs by using the internet traffic. Which of course was what I heard from Server4you, after I requested to give back my server after a few days. Personally I think that’s not the way the law should be interpreted in this case and even if it seems they are right, any normal customer service would have accepted my request for termination for the sake of good customer relationships, but not this one. So basically I kept the server for now and won’t ever buy anything again from them or actually recommend them to anyone.

Nevertheless I now had two virtual windows servers. Interesting enough both ran on SWSoft’s Virtuozzo. A virtualization software I hadn’t come accross before, so I had no experience. (All servers we run in our company and any I run personally either use Virtual Server, Virtual PC or a VMWare variation.) Anyway after cleaning and securing the installation (the 1&1 was quite secure, the Server4you a little less, but the latter also had a lot of the fancy gui administration tools PleskDesk if I remember right installed, which took a while to get rid off. 1&1 actually let me select what I wanted to have installed.)

So what is my resume about 1 year of Virtual Windows Servers. Hmm… let me find the right word… Dissapointed. Let me explain why…

The servers are Standard Editions of Windows Server 2003 (64-bit) and you had almost full administrator access. You couldn’t connect to the console session, which seems to be a limitation of the Virtuozzo software and the configuration was ok.

But the system ist almost unusable. I have tested a number of different installations (each starting from scratch) and on most of them on both the 1&1 and Server4You servers. Let me talk about three of these:

1. SVN Server nothing else. This is the only configuration that worked most of the time. There was no IIS, there was no ASP.net nothing, just the SVN Server, one SVN administration tool and an FTP backup software. Apart from maybe running out of space I can recommend these servers for this use case. But you might actually take a linux server if you are only using SVN.

2. Mail server (hMailServer) and MySQL. I am very happy with the mail server. I have a number of installatins running at different places and even though there are some little bugs that are hard to reproduce, they are continually improving the software. After installing MySQL (5) and hMailServer and the PHP based administration toolkit everything looked quite ok. I had it running a few weeks until I noticed that I wasn’t recieving any mails any more. After logging in to the server I saw that the MySQL server had restarted but couldn’t start up again, but I didn’t know why. So I rebooted the server and then it worked again. See below why…

3. ASP.net Website + SQL 2005 Express. A very simple requirement but as soon as I had it running it very soon didn’t work as expected. During Configuration I also kept running into memory problems. IIS Manager or any mmc snap-in just didn’t start and gave me an Out-of-Memory of Memory violation error. If you are carefull and close all apps after using them, then it’s ok, you can live with it. But you cannot live with this happening in production. The SQL Server instances died now and again, the IIS killed the worker processes and sometimes when they tried restarting they got out-of-memory exceptions as well. So I kept logging onto my websites noticing that either the IIS straight away gave me an “oops error” or it couldn’t connect to the database. After rebooting the server everything worked again and sometimes it even worked after just doing an iisreste or restarting the sql express service. That’s unacceptable for any website (and the one I am running on that server does not have a lot of load).

It seems the memory management has some flaws or is just wrongly configured. To be honest I don’t know, but interestingly enough it happens on BOTH servers. So I’m heavily pointing at Virtuozzo. I’ve heard similar things from colleagues using Virtuozzo Windows Servers so I’m not alone.

To be honest I’m thinking about switching to a full windows server (no virtualization, not managed) which costs a fortune compared to linux root servers but I have more and more things that require a running windows server so it’s probably worth the money. The virtual versions were not the solution I looked for, they are cheap but if you can’t even run Community Server and a SQL Express…

Let’s see what my planning for 2007 and Q1 have to offer… and what the Windows Server prices are doing in a few months…

(BTW: there was a problem with the tcp connections to Virtuozzo clients which resulted in port 80 traffic not getting through, which sometimes wasn’t even resolved by restarting the server, but I haven’t had that problem for more than 3 months, so I guess Virtuozzo might have corrected that.)

StatTraq is dead…

November 13, 2006

 

Nooooooo

or should I say Doaaah….

Well it happens to the best. I’m using StatTraq on a lot of my WordPress Installations and I’ll keep on using it as long as it works… It worked nicely, but I’ll have to keep my eyes open for an alternative.

Imagine Cup Workshop hosted by ANUGA

November 12, 2006

Ihr könnte programmieren? Ihr habt innovative Ideen und habt Lust euch mit den Besten zu messen?

Dann nehmt am Imagine Cup teil, der weltweite größte Technologie- und Ideenwettbewerb von Microsoft. Es winkt eine Reise nach Süd Korea und Geldpreise im Gesamtwert von 120000 Dollar! (www.imaginecup.com)

Verschafft euch außerdem einen Vorteil über allen anderen in dem ihr am kostenlosen Workshop der ANUGA (Akademische .net User Group – www.anuga.at) teilnehmt. Erfahrt von den Teams der letzten Jahre auf was es ankommt, findet starke Teamkollegen und bleibe einen Schritt voraus.

Flyer

Wann: Sonntag, 03.12.06 – 10:00 – 18:00
Wo: Microsoft Österreich
Anmeldung: http://icw.anuga.at

Es gibt auch organisierte Gruppenfahrten von Linz, Klagenfurt und Eisenstadt. Infos hierzu gibt es nach der Anmeldung.

TechEd-Dev07: The abrupt end…

November 12, 2006

 

So I suddenly stopped blogging on friday :)

It was only partly my fault, the breaks weren’t long enough and they decided to shutdown everything so fast that there wasn’t enough time. See below.

Well anyway I went to visit:

Microsoft XNA and the Future of Game Development

Rob Miles, you just wish you where more like the man (insider joke), talked about the XNA framework, a game development framework targeted at programming games for the XBOX (but can also be used for developing pc games). The session was very funny and as a demo he had a wonderfull little cheese, bread and tomato game. He’s a professor at the University of Hull teaching students about game development. I wish we had professors like him.

Anyhow the XNA framework is free for all, after talking to him at the Ask the Experts stand, I found out that is should be possible to distribute the games created with the XNA framework for using on the PC, without the need of an XBOX.

By the way he was also at our Microsoft Student Partners meeting on thursday evening and has a photo on his blog. (I don’t have any fotos, but Mathias, Flickr, chaves do – I’m in there somewhere too…)

After lunch I went to: DEMO: IIS 7.0: The New .NET Extensibility Interfaces

Way cool… Remember the times where you had to go back to unmanaged c++ when you wanted to write ISAPI filters for IIS? Well good news for all, with IIS7 you can directly include ISAPI filters into the pipeline. You can also change the IIS metadata with XML which can be changed through the web.config.

Appcmd is the universal utility for IIS7 and can also be used to set metadata values from the command lne. (it changes the web.config.) And you can change it programatically much easier than before. I remember changing IIS metadata settings a few years back and believe me it was like going through the jungle with a swissknife to cut down the leaves.

There was a lot of info given by Thomas Deml, too much to blog but all very cool. See www.iis.net

So for the last session we started in “Getting the best out of WPF and WinForms 2″. We left after 15min, just wasn’t what we had expected, and neither were any of the other sessions so we did session hopping.

The real downside to the day was that at exactly 16:30 they threw us out of the building!!! come on, why so fast? You hardly had time to fill out the conference feedback form and then you were kindly but distinctly asked to leave. What on earth were they doing the rest of the evening?? The IT-pro starts on monday. and they could have let us stay another hour or so… but oh well they didn’t :( So it all ended on a bit of a sour tone…, but…

TechEd-Developers 2006 was great. Lot’s of information, great sessions and superb networking opportunities. Lunch was ok, and there could have been a bigger selection of snacks, but the drink-fridges were always full, so no problems there. The internet worked most of the time and had an acceptable bandwith and was available everywhere in the building. I’m looking forward to TechEd 2007!

Tags:

TechEd-Dev07: Day 4/1: Windows Vista for Managed Developers: Beyond .NET 3.0

November 10, 2006

 

Starting off the session by commiting to C# and calling C++ Coders Masuchists certainly points with me :) Session was held by Daniel Moth.

He covered topics much better than the session “Targeting Key Native Application Program Interfaces (APIs) from Managed Code” which was interesting but could have been shortened to 15 minutes telling us that the Windows SDK sample is available and show what it does.

Ok, first off: yes, once again we will be using a lot of PInvoke to get the neat stuff. But what’s different to the other session is that this one is not wrapped yet. (So I actually have to know how to use it.)

Glass: the new see-through windows in Vista. Uses PInvoke to dwmapi.dll and two methods: DwmIsCompositionEnabled (Is Glass enabled at all?) and DwmExtendFramIntoClientArea (enable the glass). Pretty simple if you ask me, you need a few hacks (for example you have to paint the glass area of the form black to change alpha channel to 0 and you have to have special handling for form moving.) There are even tricks to create glass windows in the middle of the form. As a side note in WPF you still have to PInvoke to get glass, even though the controls are dropped more easily on the glass area.

Task Dialog: “Messagebox on Steroids” Have you ever wanted to extend the messagebox with your own controls. Well now you can. These are wrapped in the Windows SDK (Vista Bridge).

Power Aware: You can react to power state changes in your app.

WinQual: You all know when apps crash you get the possibility to send error reports. You can use this in your own applications and do all sorts of neat stuff (like a recovery method that is called if your app is hanging, or restarting automatically including passing a string parameter to the restarted app.) WinQual is free, so you should be able to use it for your own applications as a central error reporting tool. Haven’t checked that yet. (You need a credit card to register, but a lot of the services are free, and you need a VeriSign certificate.)

The last bit was on Gadgets, but since I’ve had some experience with that I decided to leave and get my battery charged *G* A big minus point (from my perspective) is that there are now power strips in the sessions.

BTW: See the blog for the source.

Tags:

TechEd-Dev07: Speaker Idol

November 9, 2006

 

So I just happened to see the finals of the Speaker’s Idol contest at Tech-Ed. I haven’t seen any of the first rounds, but saw two of the final speakers. The idea behind Speaker Idol, is that anyone can do a 5 minute presentation on a topic of their choice. And to a well-known similar sounding show on television in each round only one can continue to the next. So there were three people left in the end.

One of them was talking of new features in ASP.net which was a bit too much content for 5 minutes and he did overflow on his time. Bert who was the last presenter actually had no slides and just coded a Cmdlet (for Powershell) from scratch. I hadn’t done one myself so it was all new and very interesting. The presentation itself was very interactive and in the end his won the contest. Now he will be back at Tech-Ed as a Speaker next year. (The other finalists all got a ticket to Tech-Ed 2007 but only as a delegate.)

Tags:

TechEd-Dev07: Day 3/3: Windows Presentation Foundation (WPF) in the Real World: Zürich Airport Monitoring System

November 9, 2006

 

This was an interesting session even though I had seen the application before. Basically they created a live view of the airports + planes for Zurich Airport based on a SOA backend with WPF.

In the session he showed us all required elements for building an app such as the Zurich app. It was an interesting 101 on WPF, Interactive Designer an VS. Very nice indeed.

Tags:

TechEd-Dev07: Day 3/1: Using the .NET Language Integrated Query (LINQ) Framework with Relational Data

November 9, 2006

 

I’m still sitting in the session but before I forget some of the stuff I decided to start blogging anyway, while still trying to concentrate :)

Linq to Sql (formerly known as DLINQ) is an extremely powerfull ORM (object relational mapper). It goes way beyond the products available at the moment. I’ve had some experience in using ORM (both static generators and dynamic frameworks) but Dlinq just goes that little bit further.

Thanks to the query language itself which is mapped to very good SQL, it doesn’t have the performance problems that some of the ORM frameworks have. Anders Hejlsberg is showing us a number of complex linq queries that are mapped to their equivalent complex T-Sql queries.

I should also note that DLinq uses a mapping between class and DB, so it doesn’t generate it on the fly, but there are three way to create a mapping. Create the class manually and attach attributes, use an xml mapping file or use the SQLMetal command line utility that will generate the csharp files and mappings manually. It will generate objects for tables, views (which are mapped to tables), sprocs and functions. Stored Procedures are converted into methods with full Intelli-Sense support and functions aswell. You can (if you specify it manually) also tell the mapper to use sprocs for insert, delete and updates of objects.

Under the hoods it’s using optimistic concurrency and will throw an Exception with options for resolving the problem.

If DLinq is not sufficient enough, because you need to write some more or less complex custom sql code, you can do so and still utilize the Linq infrastructure (identity mapping…) and it will map back to classes.

It’s probably a bit of a learning effort getting to know Linq and all the language constructs, but once you know it, you can rely on the way the sql is generated and concentrate on what you should be doing, the business logic.

Download and more Info on Linq

Tags:

TechEd-Dev07: Day 2/5: Windows Vista: Tips & Tricks for Targeting Key Native Application Program Interfaces (APIs) from Managed Code

November 9, 2006

 

Visual Studio 2005 and Windows Forms doesn’t now about anything new that came with Vista, so we had a short trip through 4 of the important changes:

1. User Access Control

If you need administrator privileges you have to run in elevated mode. You can do that by config, which gives you general administrator access, or…

you can start a new process from within your app that does the stuff you need administrator rights for. Yes, you can’t actually elevate a method or a class or any in-process object, you can only elevate a complete process. I personally don’t think that’s a usefull way, having to export all you logic to a console app or similar to launch to do the dirty stuff, but on the other hand how much will there be that you need admin rights for. Time will show… but I do wish you could have elevated a method, and the CLR did the dirty (lifting to it’s own procesS) on it’s own.

BTW: for legacy apps there is a per-user virtualization for filesystem and registy. So if old apps are writing to program files and registry, even though they are running as non-admins and won’t have access to them, they will not break, because they are virtualized in this special per-user store. (There are examples of course like High Score where that won’t help.)

2. CommandLink

A new button type in Vista, that is big and has a description. (Ok the marketing guys may describe it a bit differently, but that’s basically it.) To be able to use them in your managed apps, you need to do some dirty SendMessage’ing. We were shown how to do it, then we were shown were the Samples are (in the Windows SDK) and that there was a class that wrapped all of that.

Same goes for the little shield indicating a UAC command comming up.

3. Common Dialog Controls

They’ve changed in Vista, showing a much richer API. So if you use OpenFileDialog in .net 2.0 they will automatically be mapped to the new ones. NO THEY WON’T! Ok, they could have, not quite sure why they didn’t exchange the dll’s or the calls on the Vista CLR, but basically you’re back to PInvoke. But once again they’ve wrapped it one of the samples.

To sum up the Windows SDK has a number of samples that show you how do to the dirty stuff to get the Vista Style, but you don’t have to undestand it, you can just use it (see the VistaBridge sample). It’s unfortunate that they didn’t integrate it better into the CLR or wrap it officially (because the samples are I assume unsupported). It’s similar to the Gadgets where they just seem to have forgotten about their major development plattform (.net) and return back to the basics (dhtml + js).

Now I’m sitting in Anders Hejlsberg’s DLINQ session…

Tags: TechEd-Developers

TechEd-Dev07: Day 2/4: A Day in Life of a Query – What happens when you type GO?

November 8, 2006

 

It’s a pity the Whiteboard Sessions aren’t marked with difficulty level like the Breakout Sessions. The talk was so informative, but went so deep that I was swimming in all the tech-talk and it was hard to follow everything. I’m sure it was very valuable for the SQL MVPs in the room, but it definetely was a level 500 or so talk…

You can get a log of technical details on Paul Randal’s blog.

Tags: