Friday, January 26, 2007

Two methods to determine the permissions for your assemblies

I don't now about you, but when I need to perform one action more than a dozen times, there is the unmistakable suspicion that either it can be automated or there is an easier way to do it. In my previous post I talked about how to configure CAS in WSS solution. One piece of information I need to complete this task is to compose a list of all permissions used by the deployed assemblies. With a limited number of assemblies and dependencies the manual method of trial and error works pretty well, since most of the time the exception contains the failed permission. Nevertheless when the number of analyzed assemblies increases this becomes a somewhat tedious task.

Well lucky me. I found this utility in the .Net framework that determines the exact permissions for one or more assemblies. So typing as little as permcalc -Show <assemblyName> saves quite a bit of time. Here is a the link to a full description of the tool :


No comments: