stop my idle remote desktop session form being logged out on windows server 2012 r2 - session-timeout

I'm running performance tests from a virtual windows 2012 r2 server.
Tests take several hours to run, if my remote desktop session is disconnected or idle for more than ~30 minutes, then when I reconnect using mstsc.exe I login again and my existing session is either logged out at that point, or has expired during the intervening period.
I've used gpedit.msc On the server to set the Idle session timeout for remote desktop to never and restarted the server - But I'm still seeing the same behavior. Any ideas?
Note:
I'm not an admin on the server, normal user with some extra permissions.
I've enabled the "Set time limit for disconnected sessions" and set it to "Never" under 'Computer Configuration' - Help suggests this is the dominant setting, and there's no overriding group policy.

I had this same behavior with one of our 2012 R2 server.
After trying all hints finally, editing the registry on the server fixed this issue to me.
Login as local administrator into the 2012 R2 server.
Open registry.
Edit the values as below, save and restart the server.
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
"MaxDisconnectionTime" set to 0
"MaxIdleTime" set to 0

Related

IIS WebSite Connection Timeout during Tests for 5-15 minutes

I am experiencing next issue:
I have an AspNetCore website that is hosted on Windows Server 2012 IIS 2019.
I am running automated tests(Selenium, Chrome webdriver) for this website from any another server or PC and sometimes(not every time) after about 4 minutes i am getting Connection Timeout Error.
I am getting this error through Chrome Webdriver, Chrome, but website is accessible through any another PC/Server or even IE on the same server.
This continues for 5 to 15 minutes and after it is back again, i can access the website, i can run the tests.
Looks like something is blocking IP/Web browser from IIS.
I am running tests in parallel(4 threads).
I am running the same kind of tests for another website(which is not Core, just regular .Net Framework) and never had such issue with it.
I've checked DNS resolution - everything is fine, am getting the same error even with it hardcoded in hosts
I've disabled server firewall at all - did not work
There is no additional Antivirus protection except Windows Defender
There is no AVG set up on the server
I've tried different Servers, PCs and Chrome versions - still the same error happens from time to time.
Windows Event Log has nothing that can be linked to this issue.
Any help is extremely appreciated.

How can I run a performance and diagnostics session on a Surface RT machine?

I am trying to launch a remote performance and diagnostics session on my Surface RT machine in Visual Studio Express 2013 by selecting Debug -> Performance and Diagnostics. However, I get the following message:
Diagnostics session failed to start.
Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named '192.168.11.43:4018 (< device name >)'. Connection request was rejected by the remote debugger. Ensure that the remote debugger is running in 'Windows Authentication' mode.
OK, fair enough, so I change the remote debugger to Windows Authentication mode, but no matter what I do I can't authenticate because my PC and tablet are on different domains (that is the way it seems anyway). The tablet is running Windows RT, of course, so it is impossible to change the domain. I have tried to start the remote debugger from the command line using the -u switch with the username and domain from my PC but that was no good either since the tablet can't authenticate it. I also tried to join the tablet's domain on my PC using the script from this answer but I don't get a successful return value (the return value is 5).
Most of the blogs I have come across say "just save yourself the trouble and switch to 'No Authentication' mode" which is what I did in the first place, but the diagnostics session refuses to run this way. What hoops do I have to jump through to get this to work?
Unfortunately I don't think you can get this to work on an RT. Our team has Pros for exactly this reason. Not being able to join a domain is the killer. :(

session microsoft security client oobe stopped

i use Windows Server 2008 R2. I connect the server by remote desktop connection. But nowadays the server closes my remote desktop session randomly and all my application running during the session are closed. Simply, my remote desktop connection is forcely logged off by windows.
When i reconnect, i open event viewer and see that following error:
session 'microsoft security client' oobe stopped due to the following error: 0xC000000D
What can be reason which makes the server behave like that?
OOBE problem SOLVED ?
IT'S A SECURITY COUNTER
YOU MUST, again, MUST shutdown the security counter.
This is the reason that everyone says to delete the C:\ProgramData\Microsoft\Microsoft Security Client\Support\EppOobe.etl file. This file is used and created by this counter.
DON'T DELETE THE EppOobe.etl file instead
You MUST go into into Computer Management by these steps
-> control panel -> administrative tools -> computer management and drill down into:
System Tools -> Performance -> Data Collector Sets -> Startup Event Tracing Sessions
Then, in the frame to the right on that window, select Microsoft Security Client OOBE, right click on it and select Properties.
Click on the tab Trace Session and
Then DISABLE it (uncheck the Enabled box). Then, you select OK.
Disabling the MS Security Client Counter as I listed above, will not stop the
Security Esssentials- will run fine without it.
theses steps are for windows 7

Application Pool shutting down

Whenever I try to launch a site in the 4.0 App Pool shuts down immediately (if it ever started) an leaves an event in the event log:
Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.
The user specified is IIS APPPOOL\DefaultAppPool
followed by another event log entry
Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, and that your network is functioning correctly.
This machine is running Win 7 Ultimate
If the error is actually what is indicated in the event log, how can I reset the app pool users?
I just ran into this after upgrading my Win7 Ultimate x64 machine to SP1. The aforementioned message was found in the Application event log. It was accompanied by its good friend, "Application pool 'DefaultAppPool' is being automatically disabled due to a series of failures in the process(es) serving that application pool." in the System event log.
I changed the advanced setting of the app pool, "Load User Profile" from True to False and my app pool is running again using the configured identity (which, in my case is a domain account).
I had this problem on Windows 10, following an upgrade from Windows 8. The problem was I had a corrupt Default profile. (This can apparently occur when upgrading to Windows 10.)
When logging in for the first time with a new user, the Default profile is copied to create the profile for the new user. If it's corrupt, this can cause the login to fail for the new user.
This worked for me on Windows 10:
Take a zip of C:\Users\Default from a Windows 10 installation that doesn't have this problem
Rename C:\Users\Default on the Windows 10 install that is having problems, to Default.Old
Unzip the non-corrupt Default profile into C:\Users
Now try again with Load User Profile set to True. It should work.
In my case, Windows 10 version 1909, IIS 10, app pool running under domain account, app pool's "Load User Profile" or "Rapid-Fail Protection" settings had no effect on the issue.
When I deleted both application and it's app pool from IIS, recreated them, issue got resolved. New app pool does have Load User Profile set to true just like it was before.

Unable to start debugging on the web server. The underlying connection was closed. The connection was closed unexpectedly

All of the sudden I'm getting the following error on my local web server (Win7 64bit, IIS 7.5). I've uninstalled & reinstalled IIS locally and it didn't fix it. IIS is set to start up automatically and I can see that the service has been successfully started. Upon a fresh reboot if I go into IIS and click on start website I get the following error:
The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020
If I try to start debugging on my local website project I get the following error:
Unable to start debugging on the web server. The underlying connection was closed. The connection was closed unexpectedly.
Any ideas on what I can try? I've been doing research on the issue and Microsoft suggest making sure no other service is listening on the same ports. I've verified that this isn't the issue.
Try changing the web site to use a port other than 80 (suggest 8080 for example) and see it if will start. If so that's a sure sign of another service using port 80 (Skype is a common culprit for this).
Application pool's identity password changed?
I know this is an old post, but I can't believe how many times I've been bitten by this. Some shops use integrated security for SQL, and often then on your local IIS needs your network login for the application pool. When your password expires, and you forget to change your password here, start banging your head on the wall... DOH!
Open IIS. Select Application Pools. Select the application pool used by your app. Click Advanced Settings... Select Identity, and the little "..." button to update your user/password.

Resources