Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 Security, Membership, and Role Management ISBN: 978-0-7645-9698-8
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Security, Membership, and Role Management by Stefan Schackow; ISBN: 9780764596988
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 Security, Membership, and Role Management ISBN: 978-0-7645-9698-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2008, 03:41 PM
Registered User
 
Join Date: Aug 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Win32 and Medium level security


Hi,

We have built a special high performance DB for our particular application which also needs to run under ASP.Net 2.

As you might have guessed from the subject it is in C++ and uses
Win32 for higher performance. The DB has over 6 million records and counting.

Is there a way of running ASP.Net application at medium level security but at the same time allowing a particular code area to be able to run Win32 application? We need the higher performance as well as portability of C++.

A sample code would be great.

Thanks in advance.














 
Old August 11th, 2008, 11:45 AM
Wrox Author
 
Join Date: Feb 2006
Location: Redmond, Washington, USA.
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You need a managed wrapper for your C++ code that has the following characteristics:

1. The managed wrapper needs the ability to call unmanaged code
2. The managed wrapper needs to allow partial trust user code to call it

You can accomplish this by writing a managed assembly that is attributed with APTCA, and placing the assembly in the GAC. By existing the GAC the assembly can internally assert unmanaged code permissions which will allow it to call into your C++ code. The existence of the APTCA attribute will allow untrused ASP.NET code to call public methods exposed from your managed assembly.

Chapter 3 in the book has a simple walkthrough of creating a GAC-deployed APTCA attributed assembly in the section titled "Working with the AllowPartiallyTrustedCallers Attribute"

-Stefan




Similar Threads
Thread Thread Starter Forum Replies Last Post
User Level Security cpbsmw Access 1 February 1st, 2007 08:41 AM
User Level Security cpbsmw Access 2 January 26th, 2007 04:07 PM
Custom Membership Provider and Medium Trust level mosi_asgari BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 December 24th, 2006 11:11 AM
Problem creating user-level security JackNimble Access 2 October 11th, 2004 11:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.