Archive for tammikuu, 2009

Windows Server 2008 Core: WHAT!!! No GUI!

It was a shock for me when I tried the “new” Windows Server 2008 Core edition. After installing and rebooting the OS I was left with a nice empty desktop with just a command console, but for a few minutes I waited for the explorer.exe to fire up and give me something to work with :) I started my career with computers during DOS and Windows 3.1, but I preferred DOS back then. Now, after 10 years or so, I was once again staring at the black and empty command line. 

The “One Microsoft Way” had teached me very well to use the GUI every time, but now I did not even have the option to use it! For a few minutes I browsed the file system and checked that all the familiar folders from vista where there, but that was about it. I had to install active directory, DNS, DHCP etc all the usual stuff for basic domain controller. I had no idea what to first so I turned to my loyal friend, Google.com.

I found something that could save my day easily, CoreConfigurator from Guy Teverovsky. Unfortunately I found out, that Guy was “forced” to let go of this great tool because of some contract issues with his employer (read about it from here). 

You can read more about the tool from here and download it from here.

Tags: ,

Sharepoint: Fixing Corrupted Web.config

After playing around with some sharepoint features that wrote their settings to web.config I was left with a problem. After uninstalling the settings were still in the web.config and I had to manually remove the lines. It didn’t take long for the settings to reappear to the web.config. After some googling I found interesting blog post about this exact problem.

Because of my history with basic ASP.NET pages I presumed that the web.config would be just a static XML-file on the harddrive but I couldn’t been more wrong. Sharepoint stores programmatically added (Read more from MSDN) web.config modifications in the SQL database (by default) called Sharepoint_config_[GUID]. Randomly (server reboot, feature install/uninstall, IISRESET…) sharepoint recreates the whole web.config. It keeps the lines that are added or not stored in the config-database, but every line that exists in the database will be overwritten.

You can check the stored web.config modifications from the SQL server with a query: 

SELECT Id, ClassId, ParentId, Name, Status, Version, Properties
FROM Objects
WHERE    (Name LIKE ‘%WebConfig%’)

The interesting part is the column named ‘Properties’, because it contains the actual web.config modifications. The string is in XML-format so you are better of to just copy-paste it to some program, that knows how to format XML-properly (ex. Visual Studio)

From the same blog where I found description of this problem I also found two different solutions:

  1. Old school way (harder)
    • Direct manipulation of the SQL data. You can read the instructions from here.
  2. New school way (Easier)
    • Install “Web.Config Modifications” add-on to the Central Administration and delete the data from there. I’ve used this few times now and it’s really easy!
    • Now there’s also updated version from Harmjan Greving. You can download it from here.

But always remember that Microsoft does NOT support directly altering the data from the SQL server so don’t forget to take backups before doing this!

Tags: , ,