So what exactly is Microsoft Research doing?

I am proud to anounce that there’s a video publicly available which shows parts and projects Microsoft Research is working on currently. It’s great to see theses projects, concepts and ideas become publicly available one by one:

“Craig Mundie, chief research and strategy officer of Microsoft, presents “Rethinking Computing,” a look a how software and information technology can help solve the most pressing global challenges we face today. Part of UW’s Computer Science and Engineering’s Distinguished Lecture Series, Mundie demonstrates a number of current and future-looking technologies that show how computer science is changing scientific exploration and discovery in exciting ways. He discusses the role of new science in solving the global energy crisis, and answer questions from the audience.”

uwtv

Source: http://www.uwtv.org/programs/displayevent.aspx?rID=30363&fID=6021

How to unleash the “Virtual WiFi” feature in Windows 7 in C#

Great stuff ahead – this is just the thing I would want to write if it’s not been written already. This tool is free and open source and it’s the perfect workaround for those usual cases when you want to download a podcast in your holiday and your apple branded device tells you “You can only download files up to 10 Megabyte over 3G connections” – You take your notebook, log into 3G, create a WiFi Hotspot with this tool and off you go.

“Over the last week some of you may have heard about Connectify. It’s an app that unleashes the “Virtual WiFi” and Wireless Hosted Network features of Windows 7 to turn a PC into a Wireless Access Point or Hot Spot. Well, I looked into what it would take to build such an app, and it really wasn’t that difficult since Windows 7 has all the API’s built in to do it. After some time of looking things up and referencing the “Wireless Hosted Network” C++ sample within the WIndows 7 SDK, I now have a nice working version of the application to release. I’m calling this project “Virtual Router” since it essentially allows you to host a software based wireless router from your laptop or other PC with a Wifi card. Oh, and did I mention that this is FREE and OPEN SOURCE!”

VirtualRouterScreensshot

“The Wireless Network create/shared with Virtual Router uses WPA2 Encryption, and there is not way to turn off that encryption. This is actually a feature of the Wireless Hosted Network API’s built into Windows 7 and 2008 R2 to ensure the best security possible.
You can give your "virtual" wireless network any name you want, and also set the password to anything. Just make sure the password is at least 8 characters.”

Source: http://virtualrouter.codeplex.com/

Finally Aero Glas!

Hurray for VMWare! – I am using their products for years now – both private and on my job. It’s a blast to work with the Workstation and Fusion. Now they brought a major update to version 7 for VMWare Workstation and version 3 for VMWare Fusion. I upgraded my VMWare Fusion installation and finally the one feature that I missed the most on my Windows Vista and 7 virtual machines is available now: Aero Glas!

aeroglasOh… and it’s faster too :-)

Source: http://www.vmware.com/de/products/fusion/index.html

If you ever needed Box-Shots of your product for a presentation…

If you – like us – need a picture of a shiny product box of a soon-to-be-released product for your presentation you may want to consider buying several tools to create such shots. But you can also just use a small tool and Windows Presentation Foundation.

There’s a great article on CodeProject where a almost everything is pre-set-up for our needs. And everything is written in C# – great stuff!

In action it looks like this:

sones-boxshot

Source: http://www.codeproject.com/KB/WPF/BoxShot.aspx?display=Print

LUA is not only for WoW

It’s also suitable for anyone who wants to develop iPhone Applications.

hello-lua

“I started investigating how I might wire up — and then write native iPhone apps from — a scripting language. Lua was on my radar already. It’s compact, expressive, fast enough, and was designed to be embedded. Took only about 20 minutes to get the Lua interpreter running on the iPhone. The real work was to bridge Lua and all the Objective-C/CocoaTouch classes. The bridge had to work in two directions: it would need to be able to create CocoaTouch objects and also be able to respond to callbacks as part of the familiar delegate/protocol model.”

Source: Announcing iPhone WAX

a Visual Studio documentary

There’s a great Visual Studio documentary on CH9. Highly recommended to anyone who wants to see what happened from the start till now.

“Welcome to the first installment of the Visual Studio Documentary.This is an hour long documentary that is split into two parts, roughly a half hour each. Welcome to part one, where we take you back to the days of MS-DOS and Alan Cooper who originally sold Visual Basic to Bill Gates back in 1988.  Next week we will feature Part Two but for those that would like to watch it sooner, here is Part Two. In addition, each week we will post a longer and more in-depth stand alone interview from the interviewees that were featured in the documentary.”

Source 1: Part I
Source 2: Part II

want some more expresso?

Almost three years ago I wrote about this nice little Regular Expression Tool which provides not only a RegEx-Builder but also a clean and nice interface to test and play.

It was a CodeProject sample project in that time and as it turns out it became a full blown version 3!

Obviously the user interface was revamped completely:

expresso3 So you now not only get the Testing and playing but also a Regular Expression Library, a cool How-To, a more useable design mode and you can even output your final regular expressions to C#, VB.NET or managed C++!

Great stuff! Even better is the fact that it does not come at any costs. Despite the fact that there’s a registration you can just get your free license on their website.

Source 1: http://www.ultrapico.com/Expresso.htm
Source 2: want some espresso?

massive parallel computing with FPGAs

Today we had a great meeting with SciEngines. These guys offer a great platform for everything that needs massive parallelism and IO bandwidth scalability. They even brought a small copacobana cluster to our headquater.

IMG_0045

IMG_0044

Source 1: http://www.sciengines.com
Source 2: http://www.sciengines.com/products/computers-and-clusters/copacobana-s3-1000.html

Killer .NET 4 feature: Memory Mapped files

“So what is it? A memory mapped file allows you to reserve a region of address space and commit physical storage to a region (hmmm, sounds like virtual memory, isn’t it?) but the main difference is that the physical storage comes from a file that is already on the disk instead of the memory manager. I will say that it has two main purposes:

  • It is ideal to access a data file on disk without performing file I/O operations and from buffering the file’s content. This works great when you deal with large data files.
  • You can use memory mapped files to allow multiple processes running on the same machine to share data with each other.“

OMG! You can even specifiy views on a memory mapped file… from different processes… .NET 4 FTW!

Source: http://blogs.msdn.com/salvapatuel/archive/2009/06/08/working-with-memory-mapped-files-in-net-4.aspx

the .NET Framework sourcecode release and how to unpack it…

It’s great to finally have the .NET sourcecode for debugging purposes – inconveniently it’s in a format you might have your difficulties just browsing along. A little tool is here to help!

After you installed, let’s say the WCF sourcecode and debug symbols you get a directory structure similar to this:

wcfsource

This source.zip.tmp file holds the whole sourcecode as one big package. It can’t be unpacked – even one would suggest that by just looking at that .zip ending in the name of the file.

Instead this is a plain-text file of a certain yet simple format. I wrote me a little tool to unpack this file into it’s original files and directories.

You can get the little tool, including sourcecode, here: UnpackMSSources.zip

To start the magic, you would like to go to the command line and start the tool with two parameters. Parameter 1 is the path and filename of the source.zip.tmp file. Parameter 2 is the part of the Path that needs to be cut-off. For the WCF Sources it’s “/DEVDIV/depot/DevDiv/releases/Orcas/SP/ndp/cdf/src/” for example.

The tool will then start to whirl through the file and extract all the files it founds into directories it’s creating along the way. After some seconds you would end with a directory tree like this:

unpacked

Have fun!

Source 1: http://referencesource.microsoft.com/netframework.aspx
Source 2: http://www.schrankmonster.de/content/binary/UnpackMSSources.zip

Plain-Text Username Password Authentification with WCF

If you got it, it’s easy. If you’re starting from scratch it ain’t as easy. We were in need of such a Username+Password Authentification so I started googling around.

I found several articles but had to mash it all together in a trial-and-error session. Now that I am enlightened I want to share my knowledge:

Step 1: Implement an UserNamePasswordValidator class and override the Validate method.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IdentityModel.Tokens;
using System.IdentityModel.Selectors;

namespace sones.Pandora.Database.Hosting
{
    public class UserNamePasswordAuthentification: UserNamePasswordValidator
    {

        public override void Validate(string userName, string password)
        {
            if ((userName != "Username") || (password != "Password"))
            {
                throw new SecurityTokenException("Validation Failed!");
            }
        }
    }
}

Step 2: Edit the App.config file to enable the previously implemented UsernamePasswordValidator.

    <bindings>
      <basicHttpBinding>
        <binding name="CustomAuthentication">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Basic" proxyCredentialType="Basic"/>
          security>
        binding>
      basicHttpBinding>
    bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SecurityBehavior">
          <serviceCredentials>
            <userNameAuthentication
            userNamePasswordValidationMode="Custom"
            customUserNamePasswordValidatorType="sones.Pandora.Database.Hosting.UserNamePasswordAuthentification, PandoraDB_WebServiceHost_UsernamePasswordAuth"/>
          serviceCredentials>
        behavior>
      serviceBehaviors>
    behaviors>
    <services>
      <service behaviorConfiguration="SecurityBehavior" name="sones.Pandora.Database.Hosting.PandoraDatabaseHost">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="CustomAuthentication"
          name="ep1" contract="sones.Pandora.Database.Hosting.IPandoraDatabaseHost" />
      service>
    services>

In this example the ServiceHost will use no server SSL certificate and therefor allow normal http access instead of just using https ssl. You can configure that behavior with the <security mode=”TransportCredentialOnly”> line. Just change there and define an apropriate certificate and you’re good to go with https / ssl.

Allowing Web Service host to run locally without Administrator rights

If you’re writing WCF Web Services you maybe came to the point when you needed Administrator rights to start the Web ServiceHost. As a matter of fact the only thing you need is the right to use a that URL space.

So for  a WCF Web Service running on http://localhost:80/TestService/Ep2 you would use the netsh command line tool to set the correct rights.

Step 1: Start an Administrator-Commandline

Step 2: run “netsh http add urlacl url=http://+80/TestService/Ep2 user=SONES\bietiekay

(SONES\bietiekay = the Domain+User to grant the right)

netsh

Hail Eris! All Hail Discordia!

pope

I was in desperate need for an DDate equivalent running on Windows. DDate is an unix implementaion of date accoridng to the erisian calendar described in the principia discordia.

I only found some C Implementations. And since it’s fun to do I ported the original Discordian Date C code to C#.

You can download the C# sourcecode, licensed under CC-BY-NC here.

I also created a web page which displays the current discordian date and offers you to convert any gregorian date into discordian date representation.

This page can be accesses here. You can call another page with parameters and you only will get the ddate output back:

for example: http://ddate.schrankmonster.de/DiscordianDate.aspx?year=2009&month=6&day=9

Source 1: http://ddate.schrankmonster.de/
Source 2: http://dropbox.schrankmonster.de/dropped/SharpDDateLib.zip

Google Copy-Wave

Oh dear. Another hyped protocol/platform from Google… oh wait. It’s not from Google. It’ all started in Xerox PARC…

There are several papers that describe what Google now claims to have developed…

copywave
left: Xerox PARC Paper; right: Google Wave

Conclusion: Go and read old Papers. As it turns out almost all newly hyped things have been described in papers from years ago.

Source 1: http://www.waveprotocol.org/whitepapers/operational-transform
Source 2: http://doi.acm.org/10.1145/215585.215706

getting System.ServiceModel.AddressAccessDeniedException in automated WCF Tests

We’re currently running several build processes. So each time someone checks new code in one of the build machines gets the whole package and builds it, runs tests on it and stores the result of this whole process on the Team Foundation Server. Great stuff so far.

Until you start to do things like automated WCF Testing. We’re using the selfhosting capabilities of the WCF to start a ServiceHost and then run tests against it. This works great locally. It does not on the build machines. Even if you promote the Build-Service User to Administrator you won’t get the love.

The error you might get would look something like this:

Capture

The exception contains an URL which tells you to add the Service URL to the machines URL Access Control List. On Windows XP and 2003 you have to install the Windows Support Tools and use the httpcfg command. On Windows Vista and 2008 you should use the already installed netsh commandline tool.

Since we need to get this to work on all current and future build servers I decided to add the netsh call to the build script, which looks like this:

” border=”0″ alt=”” src=”http://www.schrankmonster.de/content/binary/WindowsLiveWriter/get.AddressAccessDeniedExceptioninautoma_9859/Capture2_thumb.png” width=”400″ height=”109″ />

Add this Target before any tests in the .proj file and you’re set.

Source 1: http://go.microsoft.com/fwlink/?LinkId=70353