Connect to a C# application on the server

I am converting a C# application to the web and thought i could use Unity. I am new to this but i believe i should be able to replace my old WPF interface with a Unity Web interface. My old program will sit on the server and the WWW class will be used to send the requests to it. It will then query the database for me and send back any information the front end needs to know. This means i have a middle layer for database protection and i do not have to re-write the program which is using .Net 4.5 and is thus incompatible with Unity.

Assuming my understanding of all that was correct, i just need to know how to communicate with a program running on the server.
So far i have the scoreboard example which is no use as it is PHP and this old wiki entry.
But each of the 3 scripts (Unity, client dll and server) are broken due to missing classes etc. and i am not sure how to fix them.

Are there any other resources that may be useful to me? Or could someone provide a basic example of how you access a server side application and get it to process your command and then return the right info?

Basically what you’ll have to do is a webservice layer in your application, to serve Unity’s WWW class with information. Implement a RESTful service using WCF in your app, that calls your database layer. In Unity, provide the URL for your methods in WWW class and collect the result (either it be XML or JSON).
As soon as you got it, de-serialize it into an object. If your application already have the models, you can easily separate them from your app in a Class Library that targets .NET 2.0 and use it both in Unity and your .NET 4.5 app, and use them as the object to be deserialized.

Remember that if JSON is your platform of choice, configure WCF to use a JSON parser that Unity can use, as it won’t be able to use JavascriptSerializer from .NET.