Re: StrongNameIdentityPermission does not working with WinForm

From: Shawn Farkas (shawnfa_at_online.microsoft.com)
Date: 05/07/04


Date: Fri, 07 May 2004 17:23:29 GMT

That restriction still exists -- if you're relying on LinkDemands for security than interfaces will be a workaround.

-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.  
--------------------
>Reply-To: "Bnaya" <bnayanet@hotmail.com>
>From: "Bnaya" <bnayanet@hotmail.com>
>References: <O7YTFmlMEHA.2244@TK2MSFTNGP10.phx.gbl> <stz8ukuMEHA.304@cpmsftngxa10.phx.gbl>
>Subject: Re: StrongNameIdentityPermission does not working with WinForm
>Date: Thu, 6 May 2004 07:33:39 +0300
>Lines: 108
>Organization: Wise Mobility
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
>Message-ID: <#rHPGNyMEHA.3096@TK2MSFTNGP12.phx.gbl>
>Newsgroups: microsoft.public.dotnet.security
>NNTP-Posting-Host: 192.115.142.55
>Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.security:5999
>X-Tomcat-NG: microsoft.public.dotnet.security
>
>TNX
>
>About Whidbey if the link demand sill behave as its behave today its doesn't
>supply a good security mechanism because
>you can access the code through interface and passing the link demand
>restriction.
>do you know more about this issue ??
>
>
>
>
>
>""Shawn Farkas"" <shawnfa@online.microsoft.com> wrote in message
>news:stz8ukuMEHA.304@cpmsftngxa10.phx.gbl...
>> If you're doing a full stack walk (and not just a link demand), then
>you'll hit the WinForms dll in the WinForms app, and this will cause an
>exception
>> to be thrown.  Unfortunately, your workaround of unioning the two
>permissions together won't work either.  A union says that both permissions
>need
>> to be met, so you'll fail since no assembly can have two strong names.
>>
>> With Whidbey we have a feature that allows you to do a disjunctive link
>demand, which would enable the scenario you're describing.  Eugene has
>> some workaround code for v1.0 and 1.1 on his blog:
>> http://blogs.msdn.com/eugene_bobukh/archive/2004/03/10/87603.aspx
>>
>>
>> -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.
>> --------------------
>> >Reply-To: "Bnaya" <bnayanet@hotmail.com>
>> >From: "Bnaya" <bnayanet@hotmail.com>
>> >Subject: StrongNameIdentityPermission does not working with WinForm
>> >Date: Wed, 5 May 2004 07:29:22 +0300
>> >Lines: 42
>> >Organization: Wise Mobility
>> >X-Priority: 3
>> >X-MSMail-Priority: Normal
>> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
>> >Message-ID: <O7YTFmlMEHA.2244@TK2MSFTNGP10.phx.gbl>
>> >Newsgroups: microsoft.public.dotnet.security
>> >NNTP-Posting-Host: 192.115.142.55
>> >Path:
>cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
>.phx.gbl
>> >Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.security:5976
>> >X-Tomcat-NG: microsoft.public.dotnet.security
>> >
>> >I'm invoking the same Dll from Console application and WinForm
>application
>> >
>> >Both signed with SrongName.
>> >
>> >
>> >
>> >the class that I'm invoking is protected with
>StrongNameIdentityPermission
>> >Demand
>> >
>> >
>> >
>> >and hear is what happened:
>> >
>> >the console application pass the demand but the WinForm failed
>> >
>> >
>> >
>> >i had try to union the StrongNameIdentityPermission blob with the
>mscorlib
>> >StrongName
>> >
>> >but it still behave is the same way.
>> >
>> >
>> >
>> >Do someone know to solve this issue ????
>> >
>> >
>> >
>> >
>> >
>> >TNX
>> >
>> >
>> >
>> >Bnaya Eshet
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>
>
>


Relevant Pages

  • RE: StrongNameIdentityPermission does not working with WinForm
    ... If you're doing a full stack walk, then you'll hit the WinForms dll in the WinForms app, and this will cause an exception ... With Whidbey we have a feature that allows you to do a disjunctive link demand, which would enable the scenario you're describing. ... StrongNameIdentityPermission does not working with WinForm ... >the class that I'm invoking is protected with StrongNameIdentityPermission ...
    (microsoft.public.dotnet.security)
  • RE: .NET-BroadcastEventWindow Application Error
    ... I found a post that produces almost the same exception as your WinForm ... control. ... A workaround is also provided in that post. ... You may refer to it through the following link: ...
    (microsoft.public.dotnet.framework.windowsforms.controls)