Sign out the user if he lost the connection to backend database - vba

I've an Access application located on a server with backend tables.
The application recorded the users sessions; login if they started the app & logout if they closed it.
Sometimes the user lost the connectivity with the server and the application been restarted, the user remains login on the previous session because recording logout from a normal exit not occurred.
Is there a way to check on the backend file if a user is disconnected to record him as "signed out"?

I think your referring to the *.laccdb file that access creates when someone is logged in to the BackEnd table.
Usually if it does list the same PC twice, once all PCs eventually logs out of the BE the *.laccdb should disappear if not, you can delete this file manually however, if the user looses connection ie the VPN goes down and doesnt log back in, then the BE will show that the PC is connected, in this case usually you can delete the *.laccdb.
If at any time you can not delete *.laccdb file Ask the user with the listed PC to log out. Worst Case if a user is not logged in but the *.laccdb exists the listed PC needs to reconnect and disconnect cleanly.
If the FE needs to check for connection to the BE it can be done but will not solve your issue, if the users PC crashed or VPN goes down whilst in the application then there very little that can be done because its too late, the damage is already done.

Related

Can't fetch data from SQL Server after connection

I have strange problem.
I wrote app which connects to SQL database and fetch data from it. 2 days ago at one of my computers (when I login on user account) it stoped to fetch data but it is connecting to server. When I login on same computer on admin account it is working normally. I tried to block the Windows Defender on the user account but nothin changes. Any ideas what could be wrongly changed on that account?
So finally what I did is I deleted the user and setup it again.
After it it was working normally.

How do I fix the error:1069 - The service did not start due to logon failure?

I have written my own windows service which interacts with a SQL database and updates it. The service was running fine and seems to be functioning correctly, however of late it seems to go down at random times and cannot restart due to the error designated in the question. I have tried various searches to fix this, but unfortunately I have come up with nothing. The aim is to eventually having this service running on my companies server, but I can't adjust any server settings, I am but a user on the server, so I have restrictions to some settings.
Any quick fixes, would be helpful!
Open the Services Manager. ( Win + R, then type services.msc )
Then right click on the SQL Server process and click Properties
Then go to Log On, and select This account:
Then click Browse, and add your username in the box. (Notice it should contain the domain, in my case is AD\myusername), then Check Names and accept.
Finally type your password in the other two fields, and that's it, you should have permission to start your process now.
Cheers!!
One issue for us was the format of the account user name, we initially used
domain\username
and got the 1069-logon error, then ultimately I tried validating the user name in the properties | logon tab of the Service (in Control Panel / Service Manager), using the "Browse" and "Search" for the user name and it turned it suggested and validated ok with the reverse format
username#domain
This also worked and resolved the 1069 error, and let us script the startup using sc.exe.
Error 1069 is vague and can have different causes. I am sharing my experience here.
I encountered this error when trying to get a service to run under my account (I am trying to get my services to see the same LocalDB as interactive processes running on my account for development purposes). I use an MSA (Microsoft Account) with Windows’s PIN login normally, so I rarely enter my Windows password. To resolve the issue, I locked my screen, selected Password input instead of PIN input, and then entered my password. I assume this somehow reminded Windows what my password was and made my local account more legit.
Before doing this, you need to configure the user account in question to have the Logon as Service privilege. To do this, open the Group Policy Editor. Expand Computer / Windows Configuration / Security Configuration / Local Policies / User Permissions Assignment and then open Login as Service. From there, you can add your user in question.
also check for "Deny Logon service" policy.
user should not be added over there
We had this issue as well because the account was set so that the password expired. After we updated the account to not expire and set the password this error stopped.
The account could also be locked out. To unlock it, you only need to change that user's password (new and old password can be the same).
What also worked for me was re-entering the password in the services->LogOn window. Even when you think the account and password is correct, re-entering it will re-grant the account permission to log on as a service.

Glassfish: Admin console logs me out before timeout

The glassfish admin console (the web-gui) keeps kicking me out after a quite short amount of time. The default session timeout of 60 minutes wasn't changed. By a short amount of time I'm talking about like 5-10min.
Any idea what might cause this?
I'm connected via localhost without password, but also tried to set a password.
The problem was that I had an application deployed on root-level-context "/" and everytime this app logged out it also killed my admin-gui-session (which was in another tab open in the same browser).

IIS 6 Application Pool inconsistently is disabled Automatically

I have a MVC Web Application deployed to a 2003 Server running IIS 6. There is an inconsistent behavior that started this week when we created a new Domain service account with God rights to be used as the identity for the Application Pool and the Anonymous User for the Website with Integrated Authentication set. This Service account has also been added to the SQL users with full rights to the data.
The inconsistent behavior is that the Web Application will run fine, hitting the data, etc..., then out of the blue the Application Pool gets automatically disabled. I check the event logs on the server and sure enough I see two warnings and an error saying that the Identity is INVALID and that the pool was disabled.
I turn it back on and then try to browse to the Website again and BOOM! It does it again. We finally after three attempts lock the account out and have to unlock it. Then it spirals back to the same issue.
Any ideas? Because I'm at my wits end!
This problem might be solved because the question is old, but anyway.
Try manual login with username and password, then
reapply the identity on the application pool, answer yes to apply user rights if questioned, restart the application pool and check the eventlog for errors.
Make sure the useraccount has the appropriate user rights , there will be complaints in the eventlog otherwise. Also make sure allow login to on the user account has the server entered or allow any.
Thanks
Andreas

.NET windows service randomly stops and will not start due to a login failure

I created a service which monitors a few servers and file shares for exchange. Written in VB.NET 2.
The service is installed and running fine(ish) but randomly and without any warning or entries in the event log it stops.
Upon noticing it stops (the web front end that it generates stops working) we have to manage ther hosting server to attempt to start it again.
If we simply try to restart it, it fails to start with a logon failure.
We then go in to the properties and re-enter the service account password, start the service again and it works fine (until the next unannounced stop)
As mentioned there are no event log entries and no pattern to the stopping.
Just wondering if anyone else has had this kind of problem and if there is anything i can do to remedy this?
Thanks guys.
This could be caused by:
An expired user password (Make sure the user account is configured with the Password never expires option checked). This is a frequent problem, although it is probably not the case here as re-entering the password is enough to make it work again.
Another batch job or service using the WRONG password for the account and thus locking out the service.