immense / Remotely

A remote control and remote scripting solution, built with .NET 8, Blazor, and SignalR.
GNU General Public License v3.0
4.59k stars 1.61k forks source link

Access is denied. at SharpDX #361

Closed ticktostick closed 3 years ago

ticktostick commented 3 years ago

Describe the bug I want to remote control a windows 10 virtual machine on vmware ESX . when I am connected to machine with remote desktop and try to remotely control the machine with Remotely I get only a black screen and noting happens but if I sign out from my remote desktop session . and connect again with Remotely it works without problem I can select remote desktop session from interface but again noting happens only a black screen

To Reproduce Steps to reproduce the behavior:

  1. Go to Home
  2. Click on Actions-->Remote control

Remotely Version Server : 2021.08.26.1335 (installed on ubuntu) Agent : 2021.08.26.1335 (on windows 10 pro 21H1)

Expected Behavior show the remote controlled machine desktop

Desktop (please complete the following information):

Additional Context

LOG when not connected with remote desktop and works OK

[Error] [InitDirectX] HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect. at SharpDX.Result.CheckError() at SharpDX.DXGI.Output1.DuplicateOutput(IUnknown deviceRef) at Remotely.Desktop.Win.Services.ScreenCapturerWin.InitDirectX() in D:\a\1\s\Desktop.Win\Services\ScreenCapturerWin.cs:line 368 SharpDX

LOG when I am remote desktop and trying to remote control:

[Error] [InitDirectX] HRESULT: [0x80070005], Module: [General], ApiCode: [E_ACCESSDENIED/General access denied error], Message: Access is denied. at SharpDX.Result.CheckError() at SharpDX.DXGI.Output1.DuplicateOutput(IUnknown deviceRef) at Remotely.Desktop.Win.Services.ScreenCapturerWin.InitDirectX() in D:\a\1\s\Desktop.Win\Services\ScreenCapturerWin.cs:line 368 SharpDX [Error] [GetBitBltFrame] The handle is invalid. at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation) at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize)

stevesobol commented 3 years ago

I'm not sure that's the intended behavior, but it's not going to work, anyhow.   Remotely, ConnectWise Control, VNC, LogMeIn and other similar products connect you to a console session.   If you then log in via RDP, you won't be able to use that console session. The session gets locked and you sit at a login screen, and if you log in again, you disconnect the RDP session. You shouldn't get a black screen, but you won't be able to do what you want to do, anyhow. That's Windows' behavior - doesn't really have anything to do with Remotely. It would happen no matter which remote control software you use.

Wednesday, October 13, 2021, 12:38:59 PM, you wrote:

Describe the bug I want to remote control a windows 10 virtual machine on vmware ESX . when I am connected to machine with remote desktop and try to remotely control the machine with Remotely I get only a black screen and noting happens but if I sign out from my remote desktop session . and connect again with Remotely it works without problem I can select remote desktop session from interface but again noting happens only a black screen To Reproduce Steps to reproduce the behavior:

  1. Go to Home
  2. Click on Actions-->Remote control Remotely Version Server : 2021.08.26.1335 (installed on ubuntu) Agent : 2021.08.26.1335 (on windows 10 pro 21H1) Expected Behavior show the remote controlled machine desktop Desktop (please complete the following information):
    • OS: windows 10 pro 21H1
    • Browser :chrome
    • Version : 94.0.4606.81 Additional Context LOG when not connected with remote desktop and works OK [Error] [InitDirectX] HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect. at SharpDX.Result.CheckError() at SharpDX.DXGI.Output1.DuplicateOutput(IUnknown deviceRef) at Remotely.Desktop.Win.Services.ScreenCapturerWin.InitDirectX() in D:\a\1\s\Desktop.Win\Services\ScreenCapturerWin.cs:line 368 SharpDX LOG when I am remote desktop and trying to remote control: [Error] [InitDirectX] HRESULT: [0x80070005], Module: [General], ApiCode: [E_ACCESSDENIED/General access denied error], Message: Access is denied. at SharpDX.Result.CheckError() at SharpDX.DXGI.Output1.DuplicateOutput(IUnknown deviceRef) at Remotely.Desktop.Win.Services.ScreenCapturerWin.InitDirectX() in D:\a\1\s\Desktop.Win\Services\ScreenCapturerWin.cs:line 368 SharpDX [Error] [GetBitBltFrame] The handle is invalid. at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation) at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
ticktostick commented 3 years ago

There are two sessions to select from console and RDP in Remote window if I can choose the RDP session then Remotely should connect me to RDP session not console. or the RDP is listed only and can not be connected to.

bitbound commented 3 years ago

This will happen if the RDP application window is minimized. Otherwise, you should be able to see and control the RDP session.

ticktostick commented 3 years ago

checked its ok when not minimized. its ok for me if not a bug we can close it Thank you