-
writing a service
Ok, so I wrote and asp .net app, one of the functions of it is, it emails new tickets added to the database users. In the options page, I allow the administrator to allow individual users to use this function or not, set whatever smtp server address, and set the polling time to check for new tickets and send emails.
OK, now I know I need to write a windows service for this, but how do I go about getting those values from my asp .net app? Should I save these in web.config and have the service check for those in web.config, or should I save them to the mysql database?
-
Re: writing a service
Since both of these components are essentially part of the same application it makes no difference if you store it in web.config or the database.
However, since these values are configurable, you are wise in storing it in a database.
Therefore, the Windows Service should be reading from the database for the values it wants.
-
Re: writing a service
I completely agree...imo having the windows app reading a web apps config file is a bad idea, the 2 should be seperated.
It also gives you more room to expand and maintain your apps in the near future.
Woka