I want to develop a windows service which will be accepting a datatable from an aspx page. Both the windows service and the website are hosted on same machine.
Also I need to set a date and time on which this service is to work. this date and time are to change according to customer needs. once again the date and time are to be fed from the aspx page.
The question is a bit broad, meaning it’s hard to give a good example with a code sample unless you’re a bit more specific about what you have already figured out, and what you need help with. Based on that, I’m guessing you’re not sure where to start.
Two possibilities:
Simple: Have the ASPX page and the server both point to the same database. In order for the aspx page to send data to the service, the ASPX page should update the database; the service should read from it. Just set the service up to poll periodically. You can also store you r dates in the DB and have the ASPX page update the dates.
More advanced: Use WCF (Windows Communication Foundation) to allow the service to listen for requests from the ASPX page. (Google WECF for example code).
You can pass DataSets as parameters into functions, even using WCF.