views:

41

answers:

2

My host only allows medium trusted web applications.

I am getting this error:

Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.

I have the code, what should I change? I read I can add a attribute in each file: [assembly:AllowPartiallyTrustedCallers] but my solution has tons of files, is there a faster way to do this? (a single global change?)

I wish I could narrow down which method or include namespace that is causing the issue. I don't even know if this assembly is signed or not.

+1  A: 

If you're deploying your web app as one or more assemblies, you should only have to add that attribute to AssemblyInfo.cs in each. . . This should really be more of a matter of making this change once per project not source file.

You should be able to do a Find in Files, set "Look at these types of files" to "AssemblyInfo.cs" and look for the text "assembly: AssemblyTitle"

You should only get one hit per project in your solution.

Jason D