Blog
Media Center Trouble – Part 2
Ramon’s tips helped me a bit further, because they enabled me to test some of the settings and try where the problem is.
I now encounter a very nice but weird phenomenon: when I use DualView on my NVidia card, I can drag Media Center to my TV. This works and shows up properly. When I maximize Media Center the image is all garbled up. But: when I open another window (this can be anything: notepad, display properties or the DirectX Control Panel (By the way: thanks for that one Ramon!
Blog
Media Center Edition trouble
It’s been a while since I’ve been blogging, because my project has been extremely hectic. Now I’m enjoying a week off, so I’ve got time for toys now… 😉
One of these toys was going to be Windows XP Media Center Edition. I installed it, bought a compatible TV card together with a MCE remote and yep: everything is working fine. At least, as long as I am watching it on my monitor.
Blog
ASP.NET 2.0 menu rendering differently in browser and at w3.org validator
I ran in to something strange today…
The ASP.NET 2.0 Menu control renders differently in a browser and in the W3 validator. Loading the page in a browser results in the usage of the correct attribute ‘vertical-align’ for the image which is used to indicate a menu has subitems. I checked this in IE and FireFox and both browsers rendered correct XHTML. When you copy the source of the rendered page and paste it in the validator-textbox at W3.
Blog
Binary .NET remoting over https: throwing errors serverside
As a follow-up to my previous post..
Eventually a colleague of mine pointed me in the right direction. The System.Runtime.Remoting part of a configfile can also contain a tag. Setting it to “Off” made that I got the expected exception. Thanks Jasper!
Blog
.NET remoting (http binary): passing (custom) errors
We are using binary .NET remoting over http for a client-server application. At the server, we have implemented custom error handling which results in the Service Interface (the facade layer) to throw a decent exception, with lots of information. The problem we encounter now is that most of the time the client displays these exceptions as BinaryFormatter exceptions, in stead of the ApplicationException or the normal Exception we throw serverside.
Blog
No-touch deployment & reading your config file
When you use No-touch deployment, reading your config file might cause some problems.
I experienced this when I received a ‘No message was deserialized prior to calling the DispatchChannelSink’ error last week. It took me quite some time before I found the problem, because of the strange error. After a while I thought about the way my app was starting: I started a separate thread which configured a remoting interface based on the config file: RemotingConfiguration.
Blog
VS2005, a first look
Last week I played with VS2005 a little. My first overall impression is: sweet! Partial classes, nullable types, generics, master pages, new controls, great extra debug info… they all make our life a little easier.
Still, some things are rather funny. For instance: why can’t you see webpage-events any more, but do you have to write them yourself combined with auto event wireup? On one hand, I could imagine that the use of (too many) page events is not the right thing to do, and that’s the reason they made it a bit harder.
Blog
IBM certified: Rational Unified Process
I’m having a good weekendstart today: I took an exam for Rational Unified Process this afternoon, and passed with a score of 91%! I am now an IBM certified Rational Unified Process professional. Sweet.
Blog
Howto: create a custom httpHandler
If you would like to (for example) make sure all the jpegs on your site are displayed including a copyright text or something like that, you could use the example I posted before. But it would be easier to write a custom httpHandler. Here’s a small howto:
Add a class to a WebApplication, and give it a decent name. Mine is customHandler.
Have the class implement the IHttpHandler interface (found in the System.
Blog
Internet Explorer Developer Toolbar (Beta)
Today I stumbled upon the Dutch Microsoft blogs and found an interesting post at the blog of Robert Fransen: the IE Developer Toolbar beta is available! The Toolbar offers you lots of handy features:
Explore and modify the document object model (DOM) of a web page. Locate and select specific elements on a web page through a variety of techniques. Selectively disable Internet Explorer settings. View HTML object class names, ID’s, and details such as link paths, tab index values, and access keys.
Blog
HowTo: implement a list that sorts based on value ( not key ! )
<div> <font face="Courier New"> <font color="#0000ff">private string</font> theKey;</font> </div> <div> <font face="Courier New"> <font color="#0000ff">private string</font> theValue;</font> </div> <div> <font face="Courier New"> </font> </div> <div> <font face="Courier New"> <font color="#0000ff">public string</font> Key</font> </div> <div> <font face="Courier New"> {</font> </div> <div> <font face="Courier New"> <font color="#0000ff">get</font></font> </div> <div> <font face="Courier New"> {</font> </div> <div> <font face="Courier New"> <font color="#0000ff">return</font> theKey;</font> </div> <div> <font face="Courier New"> }</font> </div> <div> <font face="Courier New"> }</font> </div> <div> <font face="Courier New"> </font> </div> <div> <font face="Courier New"> <font color="#0000ff">public string</font> Value</font> </div> <div> <font face="Courier New"> {</font> </div> <div> <font face="Courier New"> <font color="#0000ff">get</font></font> </div> <div> <font face="Courier New"> {</font> </div> <div> <font face="Courier New"> <font color="#0000ff">return</font> theValue;</font> </div> <div> <font face="Courier New"> }</font> </div> <div> <font face="Courier New"> }</font> </div> <div> <font face="Courier New"> </font> </div> <div> <font face="Courier New"> <font color="#0000ff">public</font> KeyValuePair(<font color="#0000ff">string</font> key, <font color="#0000ff">string</font> value)</font> </div> <div> <font face="Courier New"> {</font> </div> <div> <font face="Courier New"> theKey = key;</font> </div> <div> <font face="Courier New"> theValue = value;</font> </div> <div> <font face="Courier New"> }</font> </div> <div> <font face="Courier New"> </font> </div> <div> <font face="Courier New"> <font color="#0000ff">public int</font> CompareTo(<font color="#0000ff">object</font> obj)</font> </div> <div> <font face="Courier New"> {</font> </div> <div> <font face="Courier New"> <font color="#0000ff">if</font> (obj == <font color="#0000ff">null</font>)</font> </div> <div> <font face="Courier New"> {</font> </div> <div> <font face="Courier New"> <font color="#0000ff">return</font> 1;</font> </div> <div> <font face="Courier New"> }</font> </div> <div> <font face="Courier New"> <font color="#0000ff">else</font></font> </div> <div> <font face="Courier New"> {</font> </div> <div> <font face="Courier New"> KeyValuePair check = (KeyValuePair)obj;</font> </div> <div> <font face="Courier New"> <font color="#0000ff">return</font> Value.
Blog
HowTo: Thread safe singleton implementation of a class
Normally, if you would like a singleton implementation of a class, you would go about it a little bit like this:
<p> </font></font></font>The trouble here is that this implementation is not thread safe. The reason I post this is I recently ran into some code of an old colleague of mine (from my former employee) and some tests showed his singleton class was instantiated several times when the application was stressed with requests from the start, which caused unwanted lag in the application.