G
Guest
I have this WinForms application which is exhibiting a strange security issue.
The project contains a Form and a UserControl. The Form has a method which
populates data and an event from the UserControl. When I call the method
from the UserControl event it raises a SqlPermission exception. If I call
the method from any other method in the from (such as Form_Load) it works
fine.
I'm assuming the UserControl must have less rights assigned to it, but why?
It's embedded in the same project as the Form (and also embedded on the Form
itself). Incidentially, even if I grant the executable "FullTrust" it still
raises the exception from the UserControl event.
Does anyone know what's going on and why?
The project contains a Form and a UserControl. The Form has a method which
populates data and an event from the UserControl. When I call the method
from the UserControl event it raises a SqlPermission exception. If I call
the method from any other method in the from (such as Form_Load) it works
fine.
I'm assuming the UserControl must have less rights assigned to it, but why?
It's embedded in the same project as the Form (and also embedded on the Form
itself). Incidentially, even if I grant the executable "FullTrust" it still
raises the exception from the UserControl event.
Does anyone know what's going on and why?