This project is read-only.

My application works from my local machine, but throws a SecurityException when I move it to a network share

Sep 15, 2010 at 9:47 AM

My application works from my local machine, but throws a SecurityException when I move it to a network share. İf donot use sourcegrid component aplication work. How can solve this problem.

Sep 15, 2010 at 11:01 AM

From your description it is impossible to understand what is happening and why.

Please give at least whole exception stack trace.

Sep 15, 2010 at 11:41 AM
Edited Sep 15, 2010 at 11:41 AM

I describe again, you now source grid project has a sample applicatioın "WindowsFormsSample". if run this WindowsFormsSamle local computer works but use network share do not run. on the other hand, think a folder,  
DevAge.Core.dll,
 SourceGrid.dll,
DevAge.Windows.Forms.dll,
WindowsFormsSample.exe      
in those 4 file,   if run local machine machine it is work, but share this folder and than try run an other computer over local network, give error.  

exception below;
An unhandled exception of type 'System.Security.SecurityException' occurred in WindowsFormsSample.exe Additional information: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

 

Sep 16, 2010 at 8:33 AM

>if run local machine machine it is work, but share this folder and than try run an other computer over local network, give error.  

Why do you need this feature? Why not simply install software on another computer?

Sep 16, 2010 at 9:48 AM

It's not the problem of SourceGrid. It's .NET security error. You have to use caspol command on every computer to allow to start application from network share. More here:

http://blogs.msdn.com/b/shawnfa/archive/2004/12/30/344554.aspx

http://msdn.microsoft.com/en-us/library/cb6t8dtz%28VS.80%29.aspx

 

Sep 16, 2010 at 12:01 PM

thanks domasd and dariusdamalakas;

CasPol.exe -m -ag 1.2 -url file://\\ShawnFa-Srv/Tools/* FullTrust      

Apply this command to client computer, application work,

Best regards.