views:

39

answers:

1

I'm working on a project where a hardware device will be sending small chunks of text data (around every 5 seconds) to a port on the Windows 2003 server. I need to capture that data and insert it into SQL server for later retrieval, display, analysis etc.

Obviously I need something to monitor the port for the incoming traffic, and then some way to run an INSERT using it. I'm an advanced asp.net and sql developer, but this is a little beyond that scope.

A: 

You can write a client application in your language of choice which captures the data from the port and uses SQL to insert it. Since you say you're an expert with ASP.NET, this should be fairly simple for you once you're shown the proper classes.

You're looking for System.Net.Sockets; there's a lot of fun toys in there.

It's not a much different methodology from working with requests in ASP.NET; deep down a request that you handle in ASP.NET was started with a socket. If your hardware device is sending UDP (it should be, it's a lot easier to handle both in your client program and on the device itself), receiving that data is trivial. TCP is not much harder.

Jed Smith
Thanks, I'll look around that namespace. It sounds like a little C# console app would be the way to go then.
Jeff S