CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 5/23/2007 12:10:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 36 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
Sleb
Asp.Net User
Execute dll in medium trust5/23/2007 12:10:22 PM

0/0

 Hi,

 I have an application where I need to execute an activeX called  SIPSExec.dll

 
This is how I execute it

 Dim transaction As New SIPSExec.Execute()
 
The maximum trust level I can have is Medium so it fails with this error System.Security.SecurityException: System.Security.Permissions.SecurityPermission
 
Is there an alternative way to execute a dll using medium trust only ?
 
Thanks 
 
 


 

donkiely
Asp.Net User
Re: Execute dll in medium trust5/23/2007 3:38:11 PM

0/0

Hi,

You're having this problem because the Medium trust level doesn'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't have this permission.

There are two decent options. One is to create a custom trust level that adds the permission to the medium trust level. This isn'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.

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.

The best description I've seen about these techniques is in Dominick Baier's Developing More-Secure Microsoft ASP.NET 2.0 Applications.

Make sense?

Don
 


Don Kiely, MCP, MCSD
In the Last Frontier, Interior Alaska
Please post questions and replies to the forum! And remember to MARK AS ANSWER when someone definitively answers a question or resolves a problem!
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Security, Membership, and Role Management Authors: Stefan Schackow, Pages: 611, Published: 2006
Excel Annoyances: How to Fix the Most Annoying Things about Your Favorite Spreadsheet Authors: Curtis Frye, Pages: 256, Published: 2004
Access 2003 VBA Programmer's Reference: programmer's reference Authors: Patricia Cardoza, Patricia DiGiacomo, Teresa Hennig, Graham Seach, Armen Stein, Pages: 984, Published: 2004
The "no Assumptions" Guide to Windows XP Authors: Mark Wheeldin, Pages: 496, Published: 2005
The Ultimate Windows 2000 System Administrator's Guide: Ultimate Administration Guide Authors: G. Robert Williams, Mark Walla, Pages: 895, Published: 2000

Web:
running eworld.UI.dll with medium trust - Excentrics World Forums UI.dll blows up, and gives an error - "assembly does not allow partially trusted callers". Can I run this dll in medium trust, or does it require full trust ...
Execute dll in medium trust - ASP.NET Forums Execute dll in medium trust. Last post 05-23-2007 11:38 AM by ... Is there an alternative way to execute a dll using medium trust only ? ...
How to run ChilkatDotNet2.dll in ASP.NET 2.0 w/ Medium Trust Aug 15, 2007 ... NET server runs Medium Trust, but you grant full trust to DLLs matching a StrongNameMembershipCondition (as shown in the blog post at ...
JoeAudette.com - System.Configuration.ConfigurationPermission in ... In most situations mojoPortal can be configured to run in Medium Trust, ... don' t care if the dll is installed on the machine or not, but in Medium Trust, ...
mojoPortal - Running in Medium Trust We include the AJAX dll System.Web.Extensions.dll in the bin folder and it can run from there in Full Trust, but for Medium Trust the host must install it ...
Under Medium trust, is it possible to allow a user to run their ... No../.If that .dll require full trust then it is not possible to run under the medium trust level. You can just try to upload all .dll files in the domain ...
Configuration for Medium Trust environment Web.Services3.dll from your web project if it's present. After these changes, your system will work correctly in the medium trust environment but you will ...
How to recompile the MySQL library to run under the Medium Trust ... NET 1.1 and 2.0 environments to run in a customized medium trust environment. ... If this is too much, you can download precompiled DLLs direct from eNom's ...
Getting MySQL to function in medium trust Another solution is to place MySQL.Data.Dll in GAC and that solution is also used by some webhosts. Previous: Testing medium trust for ASP.NET locally ...
hubFS: THE place for F# - F# and ASP.Net under Medium Trust Compiler.CodeDom.dll in the Bin directory... Has anyone been able to run a F# website on a host under similar conditions under Medium Trust? ...




Search This Site:










disable html button

new membership feature interferes with other sites.

building pages in wep application project

load asp pages

preview is not working / site (or dns) not found /autorefresh on custom portal locale

problem with desing view , to hides non display elements

getting a value set to null.nullinteger to be set as null on an sql database

is there something like jstl in .net?

need advice on admin site

redirecting to default page from subdirectory

page ranking

open up a file using its original software

outlook/exchange

dynamic .aspx pages

website mapping to portal

how do you create and retrieve a custom identity with web matrix?

masterpages: stretch content to fill height of the page

dnn 2.0b1 skin parsing error with [visibility]

shopping cart to paypal

session varable

incrementing a varchar

aspnet_wp.exe excessive memory usage

frontpage

installing dotnetnuke

dll

object name "aspnet"

custom and cross-domain cookie-based authentication. your views.

emailing

setting the home page

how to get a url variable and set it to a local variable

 
All Times Are GMT