How to create prompts/notications to the user of an error in Windows Service app? - service

I am creating a Windows Service app that I would like to have programmatically tell the user that an error has occurred and give hints to the user to correct the error. I was wondering if anyone knows how to do this?
The Windows service app uses an odbc connection and datareader to connect to an MS Access database and an Oracle table, so there are the probable errors that I would be handling with those, I just want to make the user aware of them if/when they occur.

You could write details of the error to an event log or database tables and notify the user via email.

Related

Use a global user to run reports across the enterprise

I have the following doubt, how recommendable it is to use a global user so that all the people in the company execute a report, I ask this because I am using rest_v2 and JasperReports Server 8.0.0 to generate reports, the problem is in the logoff, since although only run the report the user remains in session until his session on the server expires, so it occurred to me to keep a single user in session 24/7 and that with that user everyone executes their reports, this is a good or bad practice ?

PostgreSQL Custom Login Message

Does PostgreSQL allow you to set a login message when a user connects from a terminal? I want to be able to present the user with some sort of warning along the lines of: "you are connecting to a database with confidential information". I have searched for how to do this online, but I'm not having much luck. Thanks in advance.

When to create PFInstallation

I am new to using PFinstallations on Parse, and i am a bit confused as to how they work. I have an app that creates a new installation when a user creates an account, and i set the "User" field of the installation to the users userId so i can send them notifications easily later. I dont understand how the installation works when the user logs out or closes the app. In order to be able to always send the user a notification, must i create new installations periodically when these events (ie. logging out or closing the app) occur?
You shouldn't ever need to create an instance of PFInstallation. The parse framework will handle that for you if you access it using PFInstallation.currentInstallation(). But to save it to the backend, you'll need to call one of the save methods yourself.
By default, logging out will have no impact on the installation since it is a method on the user. You can have you own logic that modifies the installation on logout to, for example, clear the user field or channels.
The parse framework writes the installation to disk on the users device. When the app stops running and then restarts, parse can just read that data from disk and have the proper PFInstallation object again.

SNMP Messages for failed logon with a PostgreSQL Log

Currently my application runs and inserts events into a protected PostgreSQL DB. That's cool and it allows for audit of user login and such.
What I would like to do is be able to take failed login events after they reach a certain threshold and report those via SNMP Message to another service (like a snmp server). I just can't seem to wrap my head around how.
I thought of maybe using POST to a failed page and inside of that PHP script a system to post to PostgreSQL and query events by user by time but it seems brutal. Maybe Python? I have options but I can't think of a good implementation. Help?
I would suggest following approach:
on insert trigger on table where login attempts were logged to check number of attempts and then
when login attempts threshold achieved send NOTIFY notification
finally external service LISTEN for notification and
upon it receives one send SNMP message broadcast
For more info see:
NOTIFY and LISTEN

Error: The application has already been subscribed to by another user for this company

I am locally testing an app that integrates with Quickbooks IPP. I had connected to a demo account provided by Quickbooks developer program when I signed up but it didn't have enough data so I created my own demo account with a copy of a bunch of good data. I then cleared out the tokens and stuff in my app stored from the other demo account so I could start over. The problem is, now when I try to connect my app to this new qb account (using a different login to Quickbooks), I just keep getting this error:
Oops! An error has occurred.
Please close this window and try again.
Error Code: invalid_database
Message: The application has already been subscribed to by another user for this company
I don't see how anyone could have connected to this local app before, but just in case, I went to the "Manage My Apps" screen and the only thing I see there is "QuickBooks Online".
It is probably not related, but I'm also getting a javascript error message after clicking "Authorize" in the Intuit popup.
Line: 3
Error: Unexpected call to method or property access.
When I attempt to debug the javascript it is code in jQuery but seems to stem from the "notifyDoubleClickOfSalesActivity" function in the "Intuit.DFA.min.js" file.
What can I do at this point? I know my code is good because I was able to connect the first time.
Go to you developer account and disconnect all connected connections. This should clear up the issue.
If not, please submit a support ticket through appcenter.intuit.com.
If you already have a valid access token/connection for a particular company, another user from the same company cannot again authorize access. That is the error you see. If you go into your account on appcenter you can disconnect that IA connection, so you are able to re-create it with another user. Your code can also call the disconnect API to disconnect it, and lastly you can login as the end user and go to your account and disconnect the app.
Jarred