Results 1 to 3 of 3

Thread: writing a service

  1. #1

    Thread Starter
    Hyperactive Member Grunt's Avatar
    Join Date
    Oct 2004
    Location
    Las Vegas
    Posts
    499

    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?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  3. #3
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width