Windbg could not attach to process. Access was denied. - windbg

I tried attaching to a process (which belongs to an antivirus) using windbg. I ran windbg as administrator but I get the following error when I try to attach to the process:
Unable to examine process id 6128. Win32 error 0n5
Cannot debug pid 6128, Win32 error 0n5
Access is denied
Is there anything that I am overlooking? Thank you for your help

Even though you're logged on as an administrator, you may need to run windbg as an elevated administrator. Try right clicking the windbg icon and select "Run as administrator". Then attempt to attach to the process.
Also from Harry Johnston comment above:
Anti-virus software usually protects its processes from interference,
including debugging. There may be an option to turn this off, look for
"tamper protection" or similar. If there is no option to disable
tamper protection, there is probably no straightforward way to debug
the process.

Related

Remote Desktop Service behavior issue, RemoteApp kept freezing

My issue is while launching the RemoteApp it keeps spinning and says "Configuring remote session". Not all the time, though. It was launching a while ago and signed off. Now again launched the RemoteApp it just spinning.
And when I try to cancel it won't Cancel the RemoteApp I have to kill through the Task manager.
After killing it, I launched again and it just worked as expected
I need to get this fixed. Please suggest a resolution for me.
RDS is on Windows server 2012 R2
Client launching from Windows 10
Could you please let us know the following details.
Is this a recurring issue or 1 time occurred issue?
Please try to telnet the remote machine and check whether it's reachable or not when this problem occurs and share the feedback with us.
And also try the below solutions also, may be it'll fix this RDB freezing issue.
Try to see whether reducing Graphics helps.
This seems to have helped in few cases. This verifies whether you have the correct graphics driver.
Here’s how:
Right click the Windows desktop and choose Personalize.
Click "Display Settings".
Click "Advanced Settings”.
Click on "Troubleshoot" tab.
Click on "Change Settings".
On the resulting Display Adapter Troubleshooter dialog box, drag the slider one notch to the left.
If changing the video hardware acceleration solves the problem, it's a signal that your computer's video driver isn't quite perfect.
In such cases, download the driver from the link below.
http://support.dell.com/support/downloads/driverslist.aspx?c=us&cs=19&l=en&s=dhs&os=WW1&osl=en&catid=&impid=&SystemID=STUDIOXPS8100
Connect and see if there’s any improvement.
Security software could also be one of the reasons.
Temporarily disable them and verify the result.
Try disabling Receive Window Auto-Tuning.
Here is what you need to do:
Go to Start and type cmd.
Right-click on cmd and select “Run as administrator”.
Type: netsh interface tcp set global autotuninglevel=disabled and press Enter.
If you want to to re-enable it:
Type: netsh interface tcp set global autotuninglevel=normal and press Enter.
If this doesn’t help, please post your concerns at Technet forums for further support.
http://social.technet.microsoft.com/Forums/en/w7itpronetworking/threads
Note: Ensure to enable all your security software by now.
If the above steps unsuccess, use below steps and try the same.
Logon to the Remote Desktop Services Session Host computer as an administrator
Start--Run gpedit.msc
In the left pane, under Computer Configuration, navigate to following:
Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Remote Session Environment
In the right pane, double-click on Set compression algorithm for RDP data
Select Enabled, and choose Balances memory and network bandwidth
Click OK to save the change

Access Denied Error when issuing Install-AzureWinRMCertificate

I have been working diligently to get Dynamics Installed on Azure, I have made it a good way through the Example-1VM.ps1 before encountering a failure to 'Install-AzureWinRMCertificate' error message indicating access denied.  The error is coming while running the PowerShell script 'New-NAVAdminSession.ps1'  I can see from looking in Azure, much of the work has been done properly from the Example-1VM.ps1 file, but I'm not sure what is next,  Can I manually install the certificate and if so may I know how?  If not, how do I correct this so I can re-run the Example-1VM.ps1 script.
Thanks to Walter slapping me upside the head (kindly of course) to double check if I was running PowerShell ISE as Administrator I was able to get this resolved.
Once I exited PowerShell ISE and re-entered the desktop application with the option 'run as Administrator' all worked fine.
Just goes to show sometimes we are too close to our own problems.
Cheers Walter
According to your error log, it seems a permission issue. Please close your PowerShell and run PowerShell Run as Administrator.

Issue when uninstalling a service?

I am trying to uninstall a recently installed service, I am running this in command line:
c:\Windows\Microsoft.NET\Framework\v4.0.30319>installutil.exe /u "C:\inetpub\www
root\xxx\xxx\xxx.exe"
But I am getting this:
The uninstall has completed.
An exception occurred while uninstalling. This exception will be ignored and the
uninstall will continue. However, the application might not be fully uninstalle
d after the uninstall is complete.
And this:
Removing EventLog source xxx.
An exception occurred during the uninstallation of the System.Diagnostics.EventL
ogInstaller installer.
System.Security.SecurityException: Requested registry access is not allowed.
An exception occurred while uninstalling. This exception will be ignored and the
uninstall will continue. However, the application might not be fully uninstalle
d after the uninstall is complete.
I have no idea where to begin and I really need to uninstall these so any help is appreciated
I was facing exact same issue.
The issue is resolved by opening the Command Prompt as Administrator.
My guess is that you are probably trying to remove a service using a user account which does not have sufficient rights. Specifically, the issue in this case is the removal of some EventLog registry keys during Uninstall.
This may also occur when you are logged in as a user with Administrator privileges yet did not run the Command Prompt in 'Administrator Mode'.
One way to fix this is to make sure that you are running the Command Prompt in Administrator mode. (Right-click > Run as Administrator)
I have also encountered some cases where this method still fails to solve the SecurityException problem due to some registry keys not having 'Full Control' permissions for Administrator accounts.
The following keys should have 'Full Control' set for Administrators in order for the service to be able to write to the EventLog:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application
This may be done by:
Invoking the Windows Registry Editor
Run [Win + R]
Type 'regedit'
OK
Navigate a path listed about
Right click on the desired path
Make sure that both Read and Full Control permission checkboxes are ticked for Administrators
Click Apply and OK
Repeat the same process for the other path

Remote debugging, creating a server

I'm following some WinDbg instructions from the CodeProject tutorial.
To start a server, I can get this to work from the command line fine:
WinDbg –server npipe:pipe=pipename
(note: multiple clients can connect).
Where do I enter this from the windbg UI? I tried the command browser window, but that didn't seem to do anything:
.server npipe:pipe=pipename
(note: single client can connect)
This question is related to creating the server from WinDbg UI, not connecting from the client.
I am assuming that you are referring to usermode debugging here, so I will respond with that in mind.
From windbg attached to your program that you want to remote:
If you want to use symbols that are cached on the target, then run:
from the Command Window's prompt type .server npipe:pipe=YourPipeName
If you have another machine with with a larger symbol cache, then on the target run:
dbgsrv -t tcp:port=4000
This sets up a thin debug client (a.k.a. remote stub)
Then on the machine running the debugger, open Windbg > File > Connect to remote stub
tcp:server= machine_running_dbgsrv ,port=4000
Now hit F6 and attach to the process you want to debug.
Note: the versions of windbg have to be the same on the machine running dbgsrv and the one running windbg. If they don't match, when you get to part where you hit F6, you end up with no processes in the process list.
Jason
File -> Connect to remote session. Or just use CTRL-R.

DebugView Error

I'm working with Windows 7 64X and DebugView 4.76.0.0.
Logs isn't shown on DebugView.
I trying to write logs with Debug.WriteLine("Text"); and see nothing.
I can see that It's connected to my computer.
When I use DebugView V4.64.0.0 I get error message that it is already connected to other instance of DebugView, but I've checked and there isn't any other.
What can I do or check ?
BTW,
I can see the log in the output window.
Regards,
Eitan Gabay
To check if you really have another instance of debugview running, open up your task manager, and select "show processes from all users". Make sure that only one debugview is running.
When debugging through Visual Studio, Visual Studio actually competes against DebugView. If you were to compile your executable, and run it externally, you will see your log messages printed in DebugView.
One other thing that people sometimes overlook is that Debug.Write statements are excluded if a program is compiled for Release. However, you can still write to the trace if you use Trace.Write instead of Debug.Write.
All messages that you print go to a shared section of memory called DB_WINBUFFER link. It is important to realize that each windows session has its own "DB_WINBUFFER". Whenever DebugView detects that you are not in session 0, it will provide a "Capture Global" option. If your program is running as a windows service, then you will need to enable capture global (unless you are already in Session 0, which is only possible in Windows XP).