HighTechTalks DotNet Forums  

Attempt to access the method failed exception

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss Attempt to access the method failed exception in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
bernaba
 
Posts: n/a

Default Attempt to access the method failed exception - 03-26-2007 , 10:21 AM






Hello

i have a dll in GAC i'm loading this dynamically at run time, with the
following code

assembly = Assembly.Load("DynamicDll, Version=1.0.0.0,
Culture=neutral, publicKeyToken=d7fb0eda5160caf3" );
Type type = assembly.GetType("DynamicDll.DynamicClass");
object[] arguments = new object[] { txtUserText.Text };
object ibaseObject = Activator.CreateInstance(type);

i have developed a console application, the code runs successfully,
but i have another situation that i'm trying to develop .Net component
(Activex) that trying to access this dll from the client machine GAC
the code fails in the last line (Activator.CreateInstance(type) with
the "Attempt to access the method failed"

any advice?

Thanks,
Bernaba


Reply With Quote
  #2  
Old   
bernaba
 
Posts: n/a

Default Re: Attempt to access the method failed exception - 03-26-2007 , 11:51 AM






On Mar 26, 4:21 pm, "bernaba" <bernaba.nas... (AT) gmail (DOT) com> wrote:
Quote:
Hello

i have a dll in GAC i'm loading this dynamically at run time, with the
following code

assembly = Assembly.Load("DynamicDll, Version=1.0.0.0,
Culture=neutral, publicKeyToken=d7fb0eda5160caf3" );
Type type = assembly.GetType("DynamicDll.DynamicClass");
object[] arguments = new object[] { txtUserText.Text };
object ibaseObject = Activator.CreateInstance(type);

i have developed a console application, the code runs successfully,
but i have another situation that i'm trying to develop .Net component
(Activex) that trying to access this dll from the client machine GAC
the code fails in the last line (Activator.CreateInstance(type) with
the "Attempt to access the method failed"

any advice?

Thanks,
Bernaba
i found the error and i fixed it

Thanks,
Bernaba



Reply With Quote
  #3  
Old   
Phill W.
 
Posts: n/a

Default Re: Attempt to access the method failed exception - 03-27-2007 , 07:22 AM



bernaba wrote:

Quote:
i found the error and i fixed it
Good for you!

Care to share /what/ the problem was?
What you /did/ to fix it?

Just in case, you know, someone else happens to have the same problem??

Regards,
Phill W.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.