Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AllowPartiallyTrustedCallersAttribute issue #358

Open
srikanthvarmapenmetsa opened this issue Apr 26, 2023 · 2 comments
Open

AllowPartiallyTrustedCallersAttribute issue #358

srikanthvarmapenmetsa opened this issue Apr 26, 2023 · 2 comments

Comments

@srikanthvarmapenmetsa
Copy link

Hi i am getting below error when i use NUglify dll in my project

Forms Server error occurred. Contact your administrator. Error Description: Attempt by security transparent method 'Test.Minify.JSMinify.Minify(System.String)' to access security critical method 'NUglify.Uglify.Js(System.String, System.String, NUglify.JavaScript.CodeSettings)' failed. Assembly 'Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d86c87abe4a71948' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.

@trullock
Copy link
Owner

I dont know enought about this to have an opinion.

I dont know if this attribute is explicitly set for some reason or not, if it is then its definitely very old, probably ported from AjaxMin. Otherwise, is it the default?

Happy to do something to resolve this, but I dont know what. Do we need to have separately published/secured assemblies?

@srikanthvarmapenmetsa
Copy link
Author

An update on this. This is working fine if we set SecurityCritical attribute in caller method. Please let me know if there is any other solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants