Error of type system.security.permissions.uipermission at textbox.focus().

Posted by Mpshobana under VB.NET on 2/24/2012 | Points: 10 | Views : 1503 | Status : [Member] | Replies : 1
I use the following code to move a textbox along with the cursor at runtime and get user input:

Private Sub pictureBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pictureBox1.MouseClick
Try
If textflag = True Then
If TextBox4.Text = "" Then
Me.Panel2.Location = New Point(e.Location)
Panel2.Visible = True
TextBox4.Visible = True
Me.ActiveControl = TextBox4
Me.TextBox4.Focus()
End if
End if
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

It works fine, but when I host it in server and access it from client, I get system.security.permissions.uipermission at textbox.focus().

Any suggestions?

Thank you.




Responses

Posted by: Pradeepkumar417 on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Go through this below link and read the comments once.

http://littletalk.wordpress.com/2008/03/03/request-for-the-permission-of-type-systemsecuritypermissionsuipermission-mscorlib-version2000-cultureneutral-publickeytokenb77a5c561934e089-failed/

Thanks & Regards,
Software Engineer,
Pradeep Kumar

Mpshobana, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response