Using NetSQLAzMan with medium trust

Jul 26, 2009 at 5:42 PM

Hi,

I've recently deployed  my application that uses NetSQLAzMan to a hosting provider that requires all applications to run in medium trust.

Unfortulately, NetSQLAzMan library reported: [SecurityException: That assembly does not allow partially trusted callers.]

Have you already had issuses with NetSQLAzMan working with medium trust mode and do you have some advice on this?

Best regards and thank you in advance,

Igor Vukmirovic

Neoinfo ltd

Zagreb, Croatia

 

Jul 26, 2009 at 10:57 PM

Hi,

 

just add the AllowPartiallyTrustedCallersAttribute in you Web Application.

For more info please check these 2 links:

http://blogs.msdn.com/shawnfa/archive/2005/02/04/367390.aspx
http://msdn.microsoft.com/en-us/library/system.security.allowpartiallytrustedcallersattribute(VS.71).aspx

Regards,
Andrea.

Jul 27, 2009 at 9:15 AM

Hi Andrea,

as far as I understand the issue, I would have to ad this attribute at the NetSQLAzMan assembly level, which means that I'd have to re-compile the source? That's actually a thing I'd like to avoid, because this would require me to re-compile every new version of the assembly (just an organizational issue).

Could you please confirm my thoughts?

Tnx very much,

Igor

Jul 27, 2009 at 9:31 AM

Hi Igor,

the attribute should be added to your Web Application (AssemblyInfo) … not into the NetSqlAzMan Assembly.

Regards,

Andrea.

__________________________________
Andrea Ferendeles
NetSqlAzMan - Project Coordinator

http://netsqlazman.codeplex.com

Jul 27, 2009 at 5:20 PM

Hi Andrea,

I've been experimenting a bit with this issue today. Tried to put the  AllowPartiallyTrustedCallersAttribute in my assembly that wraps the NetSQLAzMan, but the exception still remained. I couldn't resolve the problem before I actually donwloaded the source code and re-compiled it with the AllowPartiallyTrustedCallersAttribute set for the NetSQLAzMan dll itself!

As far as I understand the concepts written in the two articles you mentioned (and a few others I googled), this is actually the thing that should be done.

Have you actually succeeded in solving the issue without setting the AllowPartiallyTrustedCallersAttribute for the NetSQLAzMan dll? Did anyone else come accross this problem?

Best regards,

Igor

Jul 27, 2009 at 9:31 PM

Hi,

Anybody has reported first this problem.

What I can do is add the [assembly: AllowPartiallyTrustedCallers] attribute into the next NetSqlAzMan release.

Let me know.

Regards,

Andrea.

__________________________________
Andrea Ferendeles
NetSqlAzMan - Project Coordinator

http://netsqlazman.codeplex.com

Jul 27, 2009 at 9:34 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.