I have an Application which uses SendKeys.Send function to
PHP Code:
send CTRL+and CTRL+V Keys
My operating system is
PHP Code:
Windows Server 2012 R2
It sends the keys at first with no problem but then it says Access is Denied. Why ?

I have tried to use these two methods,

PHP Code:
SendKeys.Send() 
and

PHP Code:
 My.Computer.Keyboard.SendKeys() 
Both the functions giving the same Error at certain point.

Why it's not allowing me to send keys ?

Please Help me out to solve this error. Frustrated now :/

PHP Code:
    ************** Exception Text **************
    
System.ComponentModel.Win32Exception (0x80004005): Access is denied
       at System
.Windows.Forms.SendKeys.SendInput(Byte[] oldKeyboardStateQueue previousEvents)
       
at System.Windows.Forms.SendKeys.Send(String keysControl controlBoolean wait)
       
at Microsoft.VisualBasic.Devices.Keyboard.SendKeys(String keys)
       
at WhatsApp_API_Sender.Form1.timercron_Tick(Object senderEventArgs e)
       
at System.Windows.Forms.Timer.OnTick(EventArgs e)
       
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Messagem)
       
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWndInt32 msgIntPtr wparamIntPtr lparam
Thank You!