<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Security</title><link>http://forums.asp.net/25.aspx</link><description>All about ASP.NET security (authentication, authorization, membership, roles, etc.) and the Login controls. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=24&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Execute dll in medium trust</title><link>http://forums.asp.net/thread/1721836.aspx</link><pubDate>Wed, 23 May 2007 15:38:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1721836</guid><dc:creator>donkiely</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1721836.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1721836</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;You&amp;#39;re having this problem because the Medium trust level doesn&amp;#39;t have the Unmanaged Code flag set on the SecurityPermission. In other words, your code is not allowed to call unmanaged code, in this case your ActiveX control. Even the High trust level doesn&amp;#39;t have this permission.&lt;/p&gt;&lt;p&gt;There are two decent options. One is to create a custom trust level that adds the permission to the medium trust level. This isn&amp;#39;t hard, but takes a few steps. The downside of this technique is that your entire application then has this dangerous permission. But if you are using this ActiveX component throughout your app this might be a reasonable option.&lt;/p&gt;&lt;p&gt;The other, better option is to sandbox the dangerous code, which calls this ActiveX component. Put the code that calls it into a separate assembly, grant that assembly either full trust or a custom trust level, and call into that assembly from your Web page code. This option is a bit more involved because now you have partially trusted callers into the sandboxed assembly, which requires a few extra steps.&lt;/p&gt;&lt;p&gt;The best description I&amp;#39;ve seen about these techniques is in Dominick Baier&amp;#39;s &lt;a href="http://www.amazon.com/dp/0735623317?tag=general0c-20&amp;amp;camp=0&amp;amp;creative=0&amp;amp;linkCode=as1&amp;amp;creativeASIN=0735623317&amp;amp;adid=0QTSJ0NDERYFJS15NEYW&amp;amp;"&gt;Developing More-Secure Microsoft ASP.NET 2.0 Applications&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;Make sense?&lt;/p&gt;&lt;p&gt;Don&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Execute dll in medium trust</title><link>http://forums.asp.net/thread/1721406.aspx</link><pubDate>Wed, 23 May 2007 12:10:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1721406</guid><dc:creator>Sleb</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1721406.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=25&amp;PostID=1721406</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I have an application where I need to execute an activeX called&amp;nbsp; SIPSExec.dll &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;This is how I execute it&lt;/p&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;pre&gt;&lt;font color="red"&gt; Dim transaction As New SIPSExec.Execute()&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;The maximum trust level I can have is Medium so it fails with this error &lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;System.Security.SecurityException: System.Security.Permissions.SecurityPermission&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Is there an alternative way to execute a dll using medium trust only ?&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Thanks&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>