I just created a fresh Service Fabric app with a stateless ASP.NET Core Web API service as an admin with a 5-machine debug cluster running locally. When I debug it (or any other Service Fabric app), it launches and runs successfully (e.g. I can see the expected output when I navigate to the endpoint with my browser or with Postman), I can see it running fine in the Service Fabric Explorer and I can see output in the Debug window within Visual Studio 2017, but I cannot see any events in the Diagnostic Events (note, not Diagnostic Tools) panel.
When I start debugging, the Diagnostic Events panel shows up as expected, but remains empty. I have no filter applied (no change if I click "Clear Filter" for the heck of it) and it shows at the bottom that it's Disconnected with 0 of 0 events shown. However, if I click on the green Start button, nothing happens and it continues to stay in a state of being disconnected.
Why is this and how can I get it to connect so I can see the output of ServiceEventSource calls?
Make sure that the name of the EventSource is set in the ETW Providers window:
Related
I have a shiny app running under shiny-server on a Ubuntu machine that keeps crashing at a specific event (selecting DT row).
I have this error messages in my browser's console
The application unexpectedly exited.
Diagnostic information is private. Please ask your system admin for permission if you need to check the R logs.
Still in my log folder (/var/log/shiny-server), I can't find the log of this specific app (although I see other apps' logs).
Why? Should I add any line of code to force printing the log?
So I wanted to create a windows service that runs a few commands in a batch file.
However, while I assume I can redirect stdout from the subprocess and read out an error message, I can't seem to find out how I would get that to display to the screen.
when starting a windows service, it gives errors when the service fails to start, so ideally I would like to just use the interface that pops up the other service errors rather than popping up some window of my own or writing a log file.
I used this to get started but it doesn't seem to have anything on error processing.
http://www.codeproject.com/Articles/499465/Simple-Windows-Service-in-Cplusplus
He just outputs to a debugger. I can definitely do that, but ideally the person starting the service would want to know if there was an error starting.
Yes, you can redirect the STDOUT of the spawned process. MSDN has an article on that topic:
Creating a Child Process with Redirected Input and Output
You can use ReportEvent(), EventWrite(), or TraceEvent() to write log messages to the System Event Log (which is located within Windows' Control Panel), depending on which logging API you decide to use. Refer to MSDN for more details:
Event Logging
Windows Event Log
A service is a background task, it should not display its own UIs. Use the system Event Viewer to view log messages. The popup the user sees if the service fails to start is not displayed by the service itself, but by the Service Control Manager.
Starting with Windows Vista, services do not run in the same desktop session as logged in users (Session 0 Isolation), so they cannot display their own UI anymore. If your service must display a popup message, it can use WTSSendMessage() for that. For more complex UIs, it is best to implement that as a separate non-service GUI app that runs in the user's session, and then the service can launch/communicate with that app as needed.
I am attempting to get the QBSDK running on my Windows 7 machine. I am trying to run the sample program called EventHandler. It is run in conjunction with the sample EventSubscribe. I have compiled these in Visual Studio 2008. The EventHandler has a option in the File menu called Register Call Back Interface. When I run that it indicates that the COM connection has been created, however when I try to subscribe to an event in the EventSubscribe sample program it gives me the error “The callback application cannot be found from the CLSID or ProgID provided in the subscription request.”
On my Windows 7 machine after I did the Register the Callback Interface I noticed that the Unregister command was not highlighted. I also compiled this on a Windows XP machine with Visual Studio 2008 and I noticed the Unregister was highlighted. I do not have Quickbooks on the Windows XP machine though.
I have tried many things to get this to work… Any idea what is happening?
I am using C++
Thanks,
Jim
This may not directly describe your situation but the concept is similar. Starting with Vista, there were quite a few workarounds with QuickBooks SDK (and other COM-based technology) that required "Run As Administrator" to configure due to Windows UAC restrictions.
From the SDK documentation:
After you subscribe your menu extension events and
register them as documented, you need to run QB
using "Run As Administrator." This only has to be
done ONCE, after running QB as admin once, your
menu items will continue to show up and menu
events will be received by your event handler without
running QB as admin.
The general principle is that even if you are running Windows under an Administrative account, you may need to "Run As Administrator" both the QuickBooks UI, and your application that uses QBSDK, during the configuration process. Once all the registration and configuration is done it should work as a normal user.
I have a Windows service written in CPP that I start manually. The service starts up just fine and works ok. However we have recently noticed in the Windows Services GUI that the service shows in the Starting state. Upon examining the Event Viewer it clearly shows that the service has entered the Running state.
Anyone got any nuggets of gold on this one?
Thanks.
The problem turned out to be an unaccounted for call to the SCM to start the service. Deleted the line and the problem went away.
I have an issue with a windows service that I am writing in c++ on Windows 7. The service works fine, when I "install" it and is removed when I "uninstall" (from services.msc list), but I am having 2 issues which I was hoping I could get some help with
If I stop the service (via services.msc), the service disappears from services.msc list.
If I stop the service via my program, the startup type of the service changes to disabled and hence does not have the "Start/Stop/Restart" buttons.
The service is stopped successfully.
I was hoping for a pointer in the right direction, I am using MSDN as the guide to writing the service. The service when started works fine.
Thank You