I assume you want your users to load your .NET code from outside of running
computer, for example, a network share (if the dll is loaded locally, you
wouldn't get the security exception).
Yes, .NET2.0 does not have User-friendly .NET Configuration applet any more
(.NET1.x does), you need to use CASPOL.exe to configure .NET security for a
computer. However, you do not have to sign your assembly a strong name in
order to allow .NET code being loaded from a network share.
Here is what I do when I want to have my .NET code being loaded from a
network share rather than being installed on each computer (if the .NET app
is complicated, such as a full scale desktop app, I'd always install it
locally):
1. Create a network share, give all users read/execute permission. Only
dedicated user (myself/net admin) has write permission;
2. Place .NET code (DLLs, EXEs) into taht folder (or its subfolders);
3. Create a Code Group, pointing to this network folder and give full trust
(or other level of trust of your choice). This is done with .NET
Configuration Applet (1.x or 2.0 if you have .NET SDK installed) or
CASPOL.exe (2.0).
Here is the simple BAT command that run CASPOL.exe for this setup:
C:\Windows\Microsoft.net\framework\v2.0.50727\caspol -machine -addgroup
All_Code -url file://serverName/DotNETCodeFolder/* FullTrust -name
MY_DOTNET_Code_Group -description "AutoCAD ObjectARX NET2.0 Applications"
So, on each computer, you simply double-click the *.bat file. The code group
will be created. From then on, whenever you have some .NET code that you'd
like being loaded by user from a central location, simply drop it into that
network folder. Since you/the admin is the only one to write file to that
folder, all code there is trusted (by you), isn't it?
wrote in message news:5387232@discussion.autodesk.com...
Help! Please!
The dll I have compiled (framework bersion 2.0) uses both file and sql
database functionality. On my workstation I have the SDK with includes a
framework version 2.0 version of mscorcfg.msc - so it was simple to set
security permissions for the compiled dll on my workstation. But I dont
really want to install Visual Studio on the user workstations just to be
able to distribute the programs I develop for Acad. Without applying
mscorcfg.msc the other users just hit exception security permission errors.
I tried using CASPOL. Caspol informed me that the assembly doesnt have a
strong name. Then I tried to apply a strong name in the assembly without
success - hit another error when trying to compile - error: referenced acad
managed object doesnt have a strong name!
What's the solution (please)?
Thanks,
Kevin.