.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ABS/ADT compatibility?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
275 Views, 4 Replies

ABS/ADT compatibility?

In developing a VB.NET app,
intended for both ABS and ADT;
The *.dll netloads/runs flawlessly in ABS 2007,
but won't even netload in ADT 2007 without bombing out in error:
(see error exeption text below)

The error has been narrowed down (I think?) to the line:

Application.AcadApplication.GetInterfaceObject(fProgID)

where fProgID is a String equal to: "AecX.AecBaseApplication.5.0"

I thought the string argument for GetInterfaceObject,
was universal for ADT/ABS, but maybe not?

If not, what's the proper string for ADT?

************** Exception Text **************

System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.Security.SecurityException:

That assembly does not allow partially trusted callers.

at

System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly
asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh,
SecurityAction action, Object demand, IPermission permThatFailed)

at MyProject.MyClass.GetAecDoc(String fProgID)

at MyProject.MyClass.MySub()

The action that failed was:

LinkDemand

The assembly or AppDomain that failed was:

MyProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null The method
that caused the failure was:

System.Object GetInterfaceObject(System.String) The Zone of the assembly
that failed was:

Intranet
4 REPLIES 4
Message 2 of 5
smcclure
in reply to: Anonymous

It is not a matter of different arugments, but it has to do with .NET security. SecurityException's are very difficult to debug and solve,

It seems that you are running in the Intranet zone. Are you running this off a network share? If so, move it locally and give it a try.. You can also try signing your application (in the My Project signing tab).

A good resource about SecurityExceptions (and avoiding them) is available at:
http://blogs.msdn.com/shawnfa/archive/2004/07/30/202468.aspx
Message 3 of 5
Anonymous
in reply to: Anonymous

smcclure wrote:
> If so, move it locally and give it a try..

you, Sir/Madame
are the *Man*/*Woman*...

(vague, unisex ID..)

Thank You!
Message 4 of 5
smcclure
in reply to: Anonymous

Hehe... Man.

Your welcome!
- Scott
Message 5 of 5
Anonymous
in reply to: Anonymous

smcclure wrote:
> Hehe... Man.

I thought so,
but one cannot be too careful...

(ask evielezebub...)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost