What is the best way to send / receive data between an ASP.NET application and a windows forms application running on the same computer? I want users to be able to go to an ASP.NET page and based on their input, have the windows application that is also running on that server perform different actions. Any ideas?
I would put the data entered into a database of some description - any database would suffice. The ASP.NET page could write a flat file which the windows app could monitor for changes, the ASP.NET page could write to a SQL Server, Oracle or Access database. The trick is if multiple users are entering data from the ASP.NET page, there are a number of processes you could use.
Personally I would use SQL Server to store the data that was entered over the web, however using this type of data store means that your windows application won't auto-refresh the data so you'd have to handle that yourself.
If you want a data-push type mechanism then a flat files may suffice to mimic this behaviour by using the FileSystemMonitor object in the System.IO namespace. As someone sends data through the ASP.NET web page it saves to a flat file or an Access database in a set directory on the web server. The FileSystemMonitor instance would then trigger your windows application to refresh the data.
You could achieve the same effect using a database server like SQL Server or Oracle but you'd have to write a refresh mechanism that checks the database for updates in the background and then when updates occur it triggers your windows form to refresh the data.
The advantage to using a database server such as SQL Server or Oracle is that your Windows application no longer needs to reside on the web server, you could run it from any machine on the network that can connect to the database server. In fact, you could even dispose of the windows application and use AJAX in a Web Application to do the same thing in a web browser. This way you can achieve the same effect from any machine without having to install your application on them.