Website and Service Sharing Bin Directory [closed]
I have an ASP.NET Website and Windows Service that I'm installing with a Wix msi.
They have the exact same dll references. I'm trying to decide if we should just have the Windows Service share the Website's bin directory and get its assemblies from there.
My gut says this is a bad idea, since we'd be abusing the purpose of the bin directory...but on the other hand duplicating the assembly installation seems kind of silly and a potential versioning problem.
Same thing with the config file. We have a custom named OurApplicationName.config file (not a regular web.confg/exe.config). Should we just have both the Web App and Windows Service share the config file and have it sit in the web root? If not, it seems like this could introduce configuration problems where the site is pointing to different databases/servers than the Windows Service.
Advice?
I agree with your gut feeling - keep them seperate - there are also security considerations as typically a Windows Service will run with higher/different security permissions than the IIS AppPool account.
A single dll file could be a command line app, windows form, web site, and web service. I see no problem with that.
精彩评论