E
Executor
I have created a user control which I would like to use in other
projects.
When I try to create an instance on a form in an other project I get an
error message.
This is the AssemblyInfo.cs of my control:
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Permissions;
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("..\\..\\MyControl.snk")]
[assembly: AssemblyKeyName("")]
[assembly: PermissionSet(SecurityAction.RequestOptional, Unrestricted =
false)]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
This is the text of the error message:
An exception occurred while trying to create an instance of
MyControl.MyControl
The exception was "Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlob,
Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089
failed
I think the problem arises from my PermissionSet(...,...).
Has anyone a suggestion which PermissionSet I should use to solve this?
Thanks in advance.
projects.
When I try to create an instance on a form in an other project I get an
error message.
This is the AssemblyInfo.cs of my control:
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Permissions;
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("..\\..\\MyControl.snk")]
[assembly: AssemblyKeyName("")]
[assembly: PermissionSet(SecurityAction.RequestOptional, Unrestricted =
false)]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
This is the text of the error message:
An exception occurred while trying to create an instance of
MyControl.MyControl
The exception was "Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlob,
Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089
failed
I think the problem arises from my PermissionSet(...,...).
Has anyone a suggestion which PermissionSet I should use to solve this?
Thanks in advance.