Anasayfa » Forum

C# SendKeys.Send("%...
 

C# SendKeys.Send("%{TAB}") Access is denied.  

  RSS
Faruk Durak
(@macir27)
Üye

Merhaba Arkadaşlar,

Windows Server 2016 bir sunucumda çalışan, c# ile yazdığım bir windows app(browser) var. SendKeys.Send("%{TAB}") diye bir kodum var(Klavyeden alt+tab tuşlarına basıyormuş gibi yapıyor). Ben sunucuya login olduğum sırada  bir sorun yok ancak dizüstü bilgisayarımdan windows + L yaptığım zaman yada server da disconnect olduğumda bu kod çalışırsa .net framework "Access is denied" diye bir hata fırlatıyor. Windows 10 da denediğimde hata almıyorum(windows + L yapsam dahi), server güvenliğine takılıyorum sanırsam. Bir fikri olan var mı? hata detayı ise şu şekilde;

 

hata

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): Access is denied
at System.Windows.Forms.SendKeys.SendInput(Byte[] oldKeyboardState, Queue previousEvents)
at System.Windows.Forms.SendKeys.Send(String keys, Control control, Boolean wait)
at System.Windows.Forms.SendKeys.Send(String keys)
at InstaBrowser.BrowserForm.tmrAltTab_Tick(Object sender, EventArgs e) in
C:\Users\f.durak\source\repos\InstaSharper-develop_new\ProxyBrowser\ProxyBrowser\ProxyBrowser\Browser.cs:line
311
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4042.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
InstaApp
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/InstaApp/InstaApp.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4042.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089
/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089
/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a
/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration
/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4042.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089
/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089
/System.Xml.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089
/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089
/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices
/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Runtime.Caching
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching
/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics
/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
ProxyBrowser
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/InstaApp/ProxyBrowser.EXE
----------------------------------------
CefSharp
Assembly Version: 75.1.142.0
Win32 Version: 75.1.142.0
CodeBase: file:///C:/InstaApp/CefSharp.DLL
----------------------------------------
CefSharp.WinForms
Assembly Version: 75.1.142.0
Win32 Version: 75.1.142.0
CodeBase: file:///C:/InstaApp/CefSharp.WinForms.DLL
----------------------------------------
CefSharp.Core
Assembly Version: 75.1.142.0
Win32 Version: 75.1.142
CodeBase: file:///C:/InstaApp/CefSharp.Core.DLL
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.8.3761.0 built by: NET48REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic
/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

 

Teşekkürler.

Bu konu 1 ay önce Ali UYSAL tarafından düzenlendi
Alıntı
Gönderildi : 07/12/2019 00:10
Ali UYSAL
(@aliuysal)
Kıdemli Üye Forum Yöneticisi

Merhaba, uygulamayı Yönetici olarak başlatmayı denediniz mi yine aynı hatayı mı veriyor?

Dijital dönüşüm başlıyor...
WinFlow e-Fatura Onay Akış Süreç Yazılımı
Android El Terminali

CevapAlıntı
Gönderildi : 07/12/2019 00:14
Faruk Durak
(@macir27)
Üye

Ali Bey, cevabınız için teşekkürler. 2 exe var ilk exe 2. Exeyi tetikliyor. Sendkey komutu 2. De, 2.exe ye sag tıklayıp özelliklerden yönetici olarak çalıştır demiştim ama işe yaramadı. 

CevapAlıntı
Gönderildi : 07/12/2019 10:36
Serkan Ateş
(@SerkanAtes)
Üye

Remote Debug ile daha detaylı geri bildirimler alabilirsiniz. Sorunuz çok genel olmuş, bu şekilde çözümleyebilmek zor görünüyor.

CevapAlıntı
Gönderildi : 09/12/2019 17:38
Paylaş:

Lütfen Giriş yap yada Kayıt ol