In my case I was receiving this error because I was trying to access configuration in my App.config, like:

string maxaDb = ConfigurationManager.ConnectionStrings["maxaDB"].ConnectionString;

To solve this I had to add System.Configuration assembly:

In your using list add:

using System.Configuration;

Client side is easiest part, javascript, in my case looks something like this:

	var ws;

	window.onload = function ()
	{
		if ("WebSocket" in window)
		{
			// Let us open a web socket
			ws = new WebSocket("ws://127.0.0.1:9192");
			ws.onmessage = function (evt) 
			{ 
				Log(evt.data)
			};

			ws.onclose = function()
			{ 
				// websocket is closed.
				Log("Connection is closed..."); 
			};
		}
		else
		{
			// The browser doesn't support WebSocket
			Log("WebSocket NOT supported by your Browser!");
		}
	}

	function WebSocketSendMessage()
	{
		ws.send(document.getElementsByName("inputSend")[0].value);
	}

	function Log(message)
	{
		document.getElementsByName("log")[0].innerHTML =  document.getElementsByName("log")[0].innerHTML + '<br/>' + message; 
	}

To create new Socket use code:

ws = new WebSocket("ws://127.0.0.1:9192"); - note that here I defined IP address and port, later you will see that in C# code I also defined on which IP address and port server will listen messages.

Event onmessage will be triggered when message is received, and to send message use method send, and that is all.

Simple example of WebSockets in C# I did it with Fleck, you can use NuGet to add it to references:

Create new console application, write code like:

namespace WebSocket
{
  using System;

  using Fleck;

  public class Program
  {
    static void Main(string[] args)
    {
      var server = new WebSocketServer("ws://127.0.0.1:9192");

      server.Start(socket =>
      {
        socket.OnOpen = () => Console.WriteLine("Listening... ");
        socket.OnClose = () => Console.WriteLine("Closed!");
        socket.OnMessage = message =>
        {
          Console.WriteLine(message);
        };
      });

      Console.ReadLine();
    }
  }
}

Notice:

var server = new WebSocketServer("ws://127.0.0.1:9192"); - as I wrote before this is IP address and port on which server listens messages.

I implemented OnMessage event which will trigger when message from the client arrives.

According to Wikipedia XSLT (Extensible Stylesheet Language Transformations) is a language for transforming XML documents into other XML documents, or other objects such as HTML for web pages, plain text or into XSL Formatting Objects which can then be converted to PDF, PostScript and PNG.

To test my application I added XML and one XSL file which I actually copied from here, since I was too lazy to write one on my own. After adding those two files, right click on them, and click properties:

Then change property "Copy to Output Directory" of those files to "Copy Always", otherwise application will not find them:

Source code is simple: 

namespace xslTransform
{
  using System.Diagnostics;
  using System.IO;
  using System.Xml;
  using System.Xml.XPath;
  using System.Xml.Xsl;

  class Program
  {
    static void Main(string[] args)
    {
      XslCompiledTransform xslt = new XslCompiledTransform();

      xslt.Load("myXslt.xsl");

      using (FileStream fs = new FileStream("cdCatalog.html", FileMode.Create))
      {
        XmlTextWriter writer = new XmlTextWriter(fs, null) { Formatting = Formatting.Indented };

        xslt.Transform(new XPathDocument("cdCatalog.xml"), null, writer);
      }

      Process.Start("cdCatalog.html");
    }
  }
}

Here notice line:

Process.Start("cdCatalog.html"); 

with that line I opened default btrowser.

Two lines are important:

xslt.Load("myXslt.xsl"); - to load transformation
xslt.Transform(new XPathDocument("cdCatalog.xml"), null, writer); - to apply transformation

Source code you can download from here.

Code to write this article I have stolen from here.

Code looks like this: 

  class Program
  {
    static void Main(string[] args)
    {
      MyEvents me = new MyEvents();
      Listener l = new Listener();
      l.Subscribe(me);
      me.Start();
    }
  }

  public class MyEvents
  {
    public event MyEventHandler MyEvent;
    public EventArgs e = null;
    public delegate void MyEventHandler(object sender, EventArgs e);

    public void Start()
    {
      while (true)
      {
        System.Threading.Thread.Sleep(3000);
        if (MyEvent != null)
        {
          MyEvent(this, e);
        }
      }
    }
  }

  public class Listener
  {
    public EventArgs e = null;
    public void Subscribe(MyEvents m)
    {
      m.MyEvent += new MyEvents.MyEventHandler(HeardIt);
    }

    private void HeardIt(object sender, EventArgs e)
    {
      System.Console.WriteLine("Test");
    }
  }

Now, lets try to analyze it part by part.

If we start from beginning, you will see code like: 

static void Main(string[] args)
{
	MyEvents me = new MyEvents();
	Listener l = new Listener();
	l.Subscribe(me);
	me.Start();
}

Then in events class notice that we had to define delegate like:

public delegate void MyEventHandler(object sender, EventArgs e);

Our event will then use delegate like:

public event MyEventHandler MyEvent;

And we called our event (delegate) method like:

MyEvent(this, e);

In this moment application still has no idea about MyEvents implementation.

We have to define "Listener" which will listen our event, and with that, we will actually implement our delegate.

First we have to "subscribe" to an event, like:

m.MyEvent += new MyEvents.MyEventHandler(HeardIt);

And finally implementation:

private void HeardIt(object sender, EventArgs e)
{
	System.Console.WriteLine("Test");
}

Example project you can download from here.