Windows Service : most appropriate location of the service specific files (database)
I have a windows service开发者_C百科 that hosts a WCF end-point that is a front-end for a SQL Server CE database.
At the moment I have it at:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
Question: what is most appropriate location for this file (database.sdf
)?
Environment.SpecialFolder.ApplicationData is user-specific. If you have an installer for your service, I'd create a traditional C:\Program Files\MyWCFService folder and store it there.
精彩评论