Best Podcast Intro Ever

by Administrator 25. Januar 2012 09:33

I attached the intro from the latest Mikrodilettanten podcast. No idea where it's coming from but it's damn funny (if you speak german).

midi034_intro.mp3 (509,30 kb)

Tags:

Fun Stuff

nTray v0.2

by Administrator 21. Januar 2012 04:48

Just a tiny update with a bugfix and a configuration optimization. If you're good with the current version there's no need to upgrade.

Check out this article to get it.

Tags:

My Stuff | Projects

DailyQuote

by Administrator 18. Januar 2012 11:55

Yet another completely useless addon for Snarl/nTray. It shows funny quoutes from http://www.great-quotes.com from time to time using Snarl.

DailyQuote-0.3.zip (5,20 kb)

Tags: , ,

My Stuff | Projects

AccuSnarl

by Administrator 16. Januar 2012 11:38

Update:

They did a site update that caused AccuSnarl to break so I updated the engine to compensate.

I did a snarl plugin to show the current weather from AccuWeather.com. There is already such a plugin, however it post way too much information so I just stripped it to the bare minimum. This is also an nTray plugin, so copy it under the modules folder (or somewhere else) and add the location to the search directories.

You have to configure the location you are interested in and the polling interval inside AccuSnarl.dll.config:


<setting name="AccuWeatherUrl" serializeAs="String">
    <value>http://www.accuweather.com/en/de/meerbusch/40667/weather-forecast/174506</value>
</setting>
<setting name="PollingInterval" serializeAs="String">
    <value>1800</value>
</setting>

To find out the correct url, go the accu weather and navigate to the quick look page. It looks like this:

AccuSnarl-0.4.zip (8,46 kb)

Tags: , ,

My Stuff | Projects

TfsSnarl is now an nTray Plugin

by Administrator 16. Januar 2012 07:52

Get the new version here.

Tags: , ,

TFS

nTray

by Administrator 15. Januar 2012 10:20

I did a little tool that allows hosting .NET assemblies performing background tasks, check it out here.

Tags: ,

C# | My Stuff | Projects | Tools

IE9 Document Compatibility Mode

by Administrator 11. Januar 2012 02:57

IE9 has some options for backwards compatibility that might really get in your way sometimes. I came across a problem where a style was not correctly applied because IE decided to go with IE7 compatibility. First of all you can manually switch to another mode using the developer tools (F12):

You can configure IE to not use it's heuristic approach and add settings for using a specific compatibility mode, however this probably won't be an option most of the time since your users would have to do it or you need some type of GPO. You may add a meta tag to your pages that set the compatibility:


<meta http-equiv="X-UA-Compatible" content="IE=9"/>

This looks much better from a developer's perspective since you might add it using a master page. However even nicer is embedding a snippet into web.config that sets an HTTP header with the same effect:


<system.webServer>
   <httpProtocol>
      <customHeaders>
         <clear />
          <add name="X-UA-Compatible" value="IE=9" />
      </customHeaders>
   </httpProtocol>
</system.webServer>

Here is an extract from the HTTP response headers that I captured using Fiddler:

[code]HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-UA-Compatible: IE=9[/code]

Check out this MSDN article for more information on the subject.

Unfortunately I did not find out what makes IE think that it should switch to some compatibility mode in the first place. This is really annoying.

 

 

Tags:

ASP.NET | ASP.NET MVC | C# | Tweaks

Nancy Host Header Binding

by Administrator 10. Januar 2012 02:10

It was quite a suprise to me to find out that Nancy uses host header binding by default. I created my Nancy host like this:

var Host = new NancyHost( new Uri( "http://localhost:8080 ), ServiceEndpointBootstrapper );

This works fine when calling the app using localhost, however if you use for instance 127.0.0.1 or the machine name you will see:

HTTP Error 400. The request hostname is invalid.

Host header binding means taking the host from the request headers. Here is a snippet of the browser request for the nancy host that does not work:

GET http://MyServer:8080/ HTTP/1.1
Host: MyServer:8080

The host header is the one taken into account - it is matched against the one used to verify whether nancy should pick up the request. You see the use of host headers mostly when running multiple web sites on one ip and port, especially with web hosting companies that cannot use different ports for obvious reasons and cannot affort to have a dedicated IP for each site.

I do not know if there is a way to disable host header binding, however you can bind multiple endpoints using the NancyHost constructor. Perhaps the default is not that bad because it allows you for instance to just host an app locally which is a nice model for some applications.

Tags: , ,

C# | Nancy

TfsSnarl

by Administrator 2. Januar 2012 07:14

Update:

TfsSnarl is an nTray plugin now. I did some minor tweaks apart from the conversion. I'd suggest to extrect below the nTray folder in a dedicated TfsSnarl folder and add the folder to the search folders in nTray:


<setting name="SearchDirectories" serializeAs="Xml">
  <value>
      <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <string>$(APP)\Modules</string>
          <string>$(APP)\Modules\TfsSnarl</string>
      </ArrayOfString>
  </value>
</setting>

I stumbled upon Snarl last week. In a nutshell it's a messag sink that can receive messages from various applications and display them in a centralized manner. I started off with the Foobar extension that shows which song you are playing and a weather notifier. Though there are not so many extensions available yet, I definitely see some potential here. The very good news is, that extensions are extremely easy to develop. There are examples for some programming languages like c# and python available.

I had the idea to integrate the TFS build notification tool here. I'm not sure at this point whether I will continue working on it, but give it a try if you work with TFS. Before starting make sure to configure the Url of your tfs server in the configuration file TfsSnarl.dll.config:


<applicationSettings>
    <Schommer.Projects.TfsSnarl.Properties.Settings>
        <setting name="Tfs" serializeAs="String">
            <value>http://hrsdustfs:8080/tfs</value>
        </setting>
        <setting name="PollingInterval" serializeAs="String">
            <value>20</value>
        </setting>
    </Schommer.Projects.TfsSnarl.Properties.Settings>
</applicationSettings>

You may optionally change the polling interval as well (in seconds).

There is a folder "Char" where you can put little avatars for the developers. Replace the backslash in the domain notation by an underscore (e.g. MYDOMAIN_UserName). If no avatar is linked to a user, the unknown image is displayed. You may put little icons into the fail/succeed folder that should be displayed when builds fail/succeed.

When builds start or end you will see notifications like this one:

You should disable the tfs build notification tool when running TfsSnarl and add the tool to your autostart folder.

Enjoy :P

TfsSnarl-0.3.zip (171,38 kb)

Tags: , ,

My Stuff | Projects | TFS

About the author

for comments and suggestions contact:

 

Month List