I have an unmanaged assebmly (encryption functionality) that a VB.NET (2.0) installer class uses for some installation diagnostics on the application server during the application installation.The problem is that whenever a method is called it throws MethodAccessException exception. When I call the method within the application itself (Windows 2.0), say any form ot other application assembly, is accepts the call as fully trusted. However,when the installer class (custom action) does the call the unmanaged assembly doesn't allow it and throws the exception. I did some research on caspol tool but still not able to grasp the code security enough to resolve the problem Thank you.
MethodAccessException
8.9k Views Asked by itisinteresting At
1
There are 1 best solutions below
Related Questions in .NET
- Does compiler optimize operation on const variable and literal const number?
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- Deleting Orphans with Fluent NHibernate
- IOrderedEnumerable to vb.net IOrderedEnumerable Conversion
- What is this namespace ITypeOfObjectsBoundToListBox ? Couldn't find it
- .net rest service with JSON string and consumed with java client
- What is best way to check if any of the property of object is null or empty?
- Telerik's WPF RadColorPicker NoColorText property not working
- Possible consequences of duplicate ProgId for different classes
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Optimizing C++ call from C#
- Make a per-web-application object available to Web API and SignalR controllers
- System.ComponentModel.DataAnnotations.Schema namespace conflict
- LINQ Except/Distinct based on few columns only, to not add duplicates
- Not displaying content by its URL string - absolute urls
Related Questions in INSTALLATION
- Bundle Multiple Xamarin apps in one pkg installer
- install a R package from directory
- Can I automate auto-app installation on my Android device?
- Stop the installshield installation if a file is not found in vb.net
- GVM: Issue when installing GVM in Ubuntu 14.04
- Not able to format namenode in hadoop-2.6.0 multi node installation
- How to install SFML in ubuntu?
- how to install packages from pypi to anaconda?
- What is PREFIX IN make PREFIX=$HOME/usr/local/OpenBLAS?
- WiX installer - change the install path
- First time app run action depending on how app was installed (Android)
- First time app run action depending on how app was installed (iOS)
- Error while installing HBase on windows
- Produce both versions x32 and x64 under PyInstaller
- Python: Trouble with dill installation
Related Questions in CODE-ACCESS-SECURITY
- Why am I having an error trying to locally install cs-script?
- Detect IP address of GitHub commit
- Sandbox AppDomain cross-assembly exception handling
- Duo security: how to pass arguments through post_argument on Duo.init() in two factor authentication
- Hidden variable in closure in .Net
- Create Delegate throws a binding error due to signature or security transparency
- How to lock down a distributed DLL?
- C# Problem Running WPF
- how to manage an asymmetric key inside a key container for an enterprise software?
- c# dll encryption
- GIT support for branch based user authorization - Best Practices or Tools?
- How can I limit access to an assembly?
- Avoiding CA2122 from Code Analysis in VS2012 with SecuritySafeCritical fails
- Claims permission check fails when ClaimsPrincipalPermission is applied to class & method within it
- java: Preventing malicious change or modification on some public functions in java packages
Related Questions in CODE-SECURITY
- Limiting code in method to only call members in same class
- Creating custom CodeAccessSecurityAttribute leads to exception on compile
- c# dll encryption
- Does Docker need to be installed ona Windows server that's hosting a GitLab CICD runner?
- Securing PHP code. Need some tips
- Save SQL Server Login savely in code (C#)
- Block decompilation using something more than obfuscation
- Which would be fastest and most secure among FastCGI, ASP.NET MVC and Web forms for Server Applications
- Is it possible to prevent a DLL from being modified?
- clang not stuck at #include "/dev/whatever"
- Could performing a .NET "security check" lead to security errors?
- Verify javascript code at server
- How to lock MATLAB files keeping them executable
- Code secure protection
- Is it impossible to secure .net code (intellectual property)?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Here is an answer I got on MSDN Forums:
This exception[MethodAccessException ] is thrown in situations such as the following:
You can see the information at the following page: http://msdn.microsoft.com/en-us/library/system.methodaccessexception(v=VS.90).aspx?appId=Dev10IDEF1&l=EN-US&k=k(APPLICATIONDEPLOYMENT);k(TargetFrameworkMoniker-
And I think your issue shoud be the second situation.
I solved the problem through reflection. Thanks, below is the link to the original answer http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/de5dc1a2-c8ab-4d6a-b283-2609ed8859df
Happy coding.