Windows services and their configuration files

Saturday, 16 June 2007 01:44 by Myself

I discovered that reading app.config from a windows service can be quite tricky. It’s all about naming and, I might need to add, the sufficient rights. The default name of the app.config is {assemblyName.exe}.config.

Eg) MyService.exe.config.

All is good this far, but let's say you deploy the application and want to change a value by editing the xml. You might end up with no change, because when the runtime engine fails to find the config file it defaults to the value from the time of compilation.

If the service is running under “Local System”, the config file should be

{assemblyName.exe}.local.config

Or it might also be (but the one above has >priority)

{assemblyName}.config. (note that the file extension is stripped)

I ran SysInternals FileMon during the start to find this out, a real handy tool that can shed some light on the most peculiar problem.


Knowing this hopefully saves you some time.

I’ve straightened out all of my problems for now, and my Windows Service is successfully hosting a WCF endpoint and the debugging works!

I finally uninstalled Visual Studio 2005, since Orcas demands monopoly, and I don’t regret it… Yet. Time for some WPF!

Tags:   ,
Categories:   Development
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Linux - in general - isn't ready yet!

Friday, 1 June 2007 07:30 by Myself
Yesterday I discovered, to my disappointment, that Linux has not evolved as much as I'd hoped for during the last couple of years. That's from my point of view, as a desktop user.

Let's start off with a brief history of my *nix experience, shall we?
It started when I was around 12 years old - I had not begun 6th grade yet that's for sure- as my father received two double CD folders by mail which immediately caught my interest. He explained that this was a distribution of Linux called "Slackware" and that it was an alternative to Microsoft Windows. It had some sort of reptile printed on the cover which also appealed to my senses. Long story short, I was gonna install it as a second OS to Win98. I clearly remember other adults laughing saying "they're gonna try on unix". Which made me ask myself, why should this be difficult?

It was a textbased install and I proceeded by trial and error. I got stuck for several days at the partitioning part just because the stupid script complained about some "mount as root" constraint :-). Then after trying hundreds of mounting paths and all of the supported file systems I made it to the next part. And I finally completed the installation. I played around with the boring prompt a few days and managed to get X and Mouse and Keyboard working and I could retire to the familiar Windows with a feeling of satisfaction.

Since then I've used Debian and Red Hat in school but never appreciated it's user-hostile GUI and complex configuration, at least compared to Windows and the fact I was raised by Windows makes me want to have certain things in a certain way. Period.



I installed Yellow Dog Linux on my PS3 yesterday. And it had been over three years since my last encounter with linux and much ought have happened. But Enlightment 17 offered the same dumb behaviour and I couldn't mount a samba share and stream hd-content or even mp3. I tried installing xine, vlc, totem, mplayer, xmms. But nothing could play directly from the samba share. And they have not managed to encorporate drag and drop neither. And there was no apparent GUI for associating files nor could I set them up in vlc or xmms.
The bad signs kept blocking my way and it mad me frustrated. I had to copy the media files to the local harddrive, then some low-res files were playable but the hd-content failed because of "video slacking more than 5 seconds (perhaps slow cpu)". 6 x 3.xGhz, slow my ass!

I understand there are ways to customize E17, associate file extensions and install codecs and that drag and drop in fact is working. But to a fellow Windows user, this should be 100 times more intuitive. Enlightment itself is moving in the right direction but there's something fundementaly missing.

Thank god the ps3 offers good gaming.
Good night!
Tags:   , ,
Categories:   OS
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed
 
Software