Request for the permission of type 'System.Security.Permissions.SecurityPermission,

adhavanv

New member
Joined
Jan 10, 2007
Messages
1
Programming Experience
5-10
Hi,
I have wrote a windows application which accesses Sqlexpress database and also text files. The app works fine on my machine but its giving the following error when i run it on other machine.

"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Source="NCCITool"
StackTrace:
at NCCITool.My.MyProject.MyForms.Create__Instance__[T](T Instance)
at NCCITool.My.MyProject.MyForms.get_frmMain()
at NCCITool.My.MyApplication.OnCreateMainForm()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at NCCITool.My.MyApplication.Main(String[] Args)
Need Help!!!
 
I was getting a similar error when I was accessing a file on the local intranet. I changed the framework security settings and the problem went away.

Control Panel - Administrative Tools - .NET Configuration - Configure Code Access Security Policy - Adjust Zone Security

Go there and adjust your settings as needed. I hope this helps.
 
Back
Top