How to change the Windows service startup type in a WiX installer
Place a ServiceConfig element within the ServiceInstall element. <ServiceConfig DelayedAutoStart=”yes” OnInstall=”yes” OnReinstall =”yes” />
Place a ServiceConfig element within the ServiceInstall element. <ServiceConfig DelayedAutoStart=”yes” OnInstall=”yes” OnReinstall =”yes” />
This is built into mongod, much like it is in the rails server. Instead of -d you’ll need to use –fork and you’ll probably want to specify –logpath /path-to/logfile –logappend as well, so that your output will be logged and will keep any previous logs. See the docs on starting and stopping Mongo for more … Read more
I was having the same problem before I configured $locationProvider in my app’s module config: appModule.config([‘$locationProvider’, function($locationProvider) { $locationProvider.html5Mode(true); }]);
I’ve had this issue too. As mentioned by genki you are probably logging into the \Windows\System32 directory. Maybe check for the log file you are expecting there first. When writing services I’ve often put a line like this in the beginning to get the current directory to behave like a normal application Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
You can get access to HttpContext.Current by enabling AspNetCompatibility, preferably via configuration: <configuration> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled=”true”/> </system.serviceModel> </configuration> That in turn allows you to get access to the current user: HttpContext.Current.User – which is what you’re after, right? You can even enforce AspNetCompatibility by decorating your service class with an additional attribute: [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] … Read more
I ran into this also. It looks like the error happens at line:1 char:1. So I assumed it doesn’t understand what “sc” is. So I changed sc create .. to sc.exe create .. and it worked for my service.
You can obtain your bean from the context by name dynamically using a BeanFactory: @Service public class Doer { @Autowired BeanFactory beans; public void doSomething(Case case){ CaseService service = beans.getBean(case.getCountryCode(), CaseService.class) service.doSomething(case); } } A side note. Using something like country code as bean name looks a bit odd. Add at least some prefix or … Read more
The usual logs end up in /usr/local/var/log/.