Click here to Skip to main content
15,890,377 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is there a difference? Pin
Meysam Mahfouzi2-Mar-04 17:55
Meysam Mahfouzi2-Mar-04 17:55 
GeneralRe: Is there a difference? Pin
sps-itsec463-Mar-04 8:48
sps-itsec463-Mar-04 8:48 
GeneralRe: Is there a difference? Pin
Meysam Mahfouzi3-Mar-04 17:27
Meysam Mahfouzi3-Mar-04 17:27 
GeneralHELP with Code Access Security! Pin
Throckmorton2-Mar-04 11:10
Throckmorton2-Mar-04 11:10 
GeneralRe: HELP with Code Access Security! Pin
Heath Stewart2-Mar-04 12:19
protectorHeath Stewart2-Mar-04 12:19 
GeneralRe: HELP with Code Access Security! Pin
Throckmorton2-Mar-04 13:58
Throckmorton2-Mar-04 13:58 
GeneralRe: HELP with Code Access Security! Pin
Throckmorton2-Mar-04 17:23
Throckmorton2-Mar-04 17:23 
GeneralRe: HELP with Code Access Security! Pin
Heath Stewart3-Mar-04 3:27
protectorHeath Stewart3-Mar-04 3:27 
The important thing is not the name of the code group, but that the permission set assigned to the code group is sufficient to run your code. What if someone changed the name of the code group or created their own? It's the CodeGroup.PolicyStatement - or rather the PermissionSet that the PolicyStatement contains - that is important.

Instead of checking that, though - as there would be much more to do - you could get the evidence for your new assembly and compare that against the CodeGroup.MembershipCondition to see if they match.

As far as launching any executables besides .NET assemblies, code access security doesn't really matter except for the ability to access that file on whatever media it resides. Your application that launches that application must have permissions to access that resource (read access, in order to launch it). It is your application that must have it, so if you want to determine whether or not you can before you launch it, you should create a FileIOPermission with the path to the resource and in a try/catch call Assert. If no exception is thrown, you can go ahead and launch the executable. Catch any SecurityException that is thrown and display and error, log it, or whatever.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: HELP with Code Access Security! Pin
Throckmorton3-Mar-04 9:19
Throckmorton3-Mar-04 9:19 
GeneralRe: HELP with Code Access Security! Pin
Heath Stewart3-Mar-04 9:27
protectorHeath Stewart3-Mar-04 9:27 
GeneralRe: HELP with Code Access Security! Pin
Throckmorton3-Mar-04 10:11
Throckmorton3-Mar-04 10:11 
GeneralRe: HELP with Code Access Security! Pin
Heath Stewart3-Mar-04 10:16
protectorHeath Stewart3-Mar-04 10:16 
Generalproblems in running app at win startup Pin
visiontec2-Mar-04 10:22
visiontec2-Mar-04 10:22 
GeneralRe: problems in running app at win startup Pin
Dave Kreskowiak2-Mar-04 11:12
mveDave Kreskowiak2-Mar-04 11:12 
GeneralClient size of an control ... Pin
Andres Coder2-Mar-04 7:49
Andres Coder2-Mar-04 7:49 
GeneralRe: Client size of an control ... Pin
Heath Stewart2-Mar-04 9:24
protectorHeath Stewart2-Mar-04 9:24 
Generalinternet explorer Pin
cmarmr2-Mar-04 7:27
cmarmr2-Mar-04 7:27 
GeneralRe: internet explorer Pin
Heath Stewart2-Mar-04 9:39
protectorHeath Stewart2-Mar-04 9:39 
GeneralRe: internet explorer Pin
cmarmr2-Mar-04 9:55
cmarmr2-Mar-04 9:55 
GeneralRe: internet explorer Pin
Heath Stewart2-Mar-04 10:00
protectorHeath Stewart2-Mar-04 10:00 
GeneralRemoting: sharing an object Pin
Judah Gabriel Himango2-Mar-04 7:24
sponsorJudah Gabriel Himango2-Mar-04 7:24 
GeneralRe: Remoting: sharing an object Pin
Heath Stewart2-Mar-04 9:21
protectorHeath Stewart2-Mar-04 9:21 
QuestionHow To: Wizard for my Application Pin
Ritesh Sompura2-Mar-04 7:01
Ritesh Sompura2-Mar-04 7:01 
AnswerRe: How To: Wizard for my Application Pin
Heath Stewart2-Mar-04 9:16
protectorHeath Stewart2-Mar-04 9:16 
AnswerRe: How To: Wizard for my Application Pin
Nick Parker2-Mar-04 9:27
protectorNick Parker2-Mar-04 9:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.