C# decimal number to integer + HTML entity fractions

I was looking for some code that could convert numbers such as 1.25 or 2.5 to a number with the denominator converted to an HTML fraction entity (1¼ and 1½).I wrote the following C# code to quickly do this job for me. It could be expanded further to include subscript and superscript fractions but for the moment I’m just dealing with basic fractions. You could easily modify it to include something like: <sup>1</sup>&frasl;<sub>10</sub> Here’s the code snippet: public static string ConvertToHTMLFraction(decimal number) { string strNumber = number.ToString(); if (number % 1 == 0) return number.ToString("0"); else { int nu

WCF doesn’t have access rights to the namespace on Windows Server

I frequently run into issues when setting up a WCF Windows Service application on a new server. I receive the following error: HTTP could not register URL http://+:8000/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). The port I pick for WCF comms doesn’t have the correct security privileges and the service doesn’t work. Fortunately the fix is simple, modify the command below with your correct port, service name and user account / domain: netsh http add urlacl url=http://+:8000/ user=DOMAIN\UserName Make sure you run the command prompt as administrator too or it won’t work. Try restarting the service and you should be back in...