Re: How can I tell waht permissions an assembly requires?

From: Shawn Farkas (shawnfa_at_online.microsoft.com)
Date: 02/26/04


Date: Thu, 26 Feb 2004 02:22:07 GMT

Yep, but PermView can only tell you what permissions you declarativly ask for. For instance, if I write an app that opens a file stream to c:\boot.ini,
inside the BCL, the File.IO classes will do an imparative demand for FileIOPermission to c:\boot.ini. This permission will not show up in
PermView's results. However, PermCalc (see my other post in this thread), will be able to detect that request.

PermView's job is pretty easy, and provably doable. However, short of simulating all possible paths through your code PermCalc has a much
more difficult job to do. Although the two tools look similar, PermCalc provides more coverage than PermView does.

-Shawn
http://blogs.msdn.com/shawnfa

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
Note:  For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they 
originated.  
--------------------
>From: Patrick Steele [MVP] <patrick@mvps.org>
>Subject: Re: How can I tell waht permissions an assembly requires?
>Date: Tue, 24 Feb 2004 13:06:58 -0500
>Message-ID: <MPG.1aa55cd2782adb1c9898cb@msnews.microsoft.com>
>References: <OlizpYh#DHA.1452@TK2MSFTNGP09.phx.gbl> <MPG.1aa40cab8d698db89898c6@msnews.microsoft.com> <#EzMevj#DHA.548
@TK2MSFTNGP11.phx.gbl>
>X-Newsreader: MicroPlanet Gravity v2.60
>Newsgroups: microsoft.public.dotnet.framework.aspnet.security,microsoft.public.dotnet.languages.csharp,microsoft.public.dotnet.security
>NNTP-Posting-Host: 209.69.88.157
>Lines: 1         
>Path: cpmsftngxa06.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:223977 microsoft.public.dotnet.security:5114 
microsoft.public.dotnet.framework.aspnet.security:8873
>X-Tomcat-NG: microsoft.public.dotnet.security
>
>In article <#EzMevj#DHA.548@TK2MSFTNGP11.phx.gbl>, "Ollie" <why do they 
>need this!!!!> says...
>> nope, as far as I can see that tells you what permissions your assembly has
>> applied, not the permissions that it requires...
>
>Hmmmm...  Perhaps this is just semantics, but if you "apply" an 
>attribute requesting a certain permission (because you "require" that 
>permission for your application), won't PermView do what the OP is 
>looking for?
>
>-- 
>Patrick Steele
>Microsoft .NET MVP
>http://weblogs.asp.net/psteele
>


Relevant Pages

  • Re: RWW
    ... Were the permissions correct, or did you have to adjust them? ... >> Add Local Service and Network Service account Read & Execute, ... >>> current web request. ... >>> Exception Details: System.UnauthorizedAccessException: Access to the ...
    (microsoft.public.windows.server.sbs)
  • Re: Receiving a strong name error when trying to access a library
    ... or use one of the other strong name hacking techniques ... > you are using asp.net) the request will have the security context of the ... > ASPNET account does not have enough permissions, ... >> an assembly tag with in code? ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: System.Security.SecurityException
    ... I needed to add permissions ... > I'm attempting to build an app then sends a request to a URL and reads the ... > Public Function LoadURL(ByVal Url As String) As String ... > Dim sr As New StreamReader ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Access is denied
    ... What are you trying to instantiate? ... then check permissions on that object. ... What do you mean by all permissions (for ASP account)? ... > execution of the current web request. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Access problems trying to access my log files
    ... folder to get the name of the folder the ex040920.log is ... granting access rights to the resource to the ASP.NET request identity. ... As I said I did try to set the permissions to everyone to solve the problem ... This is only on my WXP Pro machine so I am not concerned ...
    (microsoft.public.dotnet.framework.aspnet)