Solved

Required permissions cannot be acquired.

Posted on 2006-11-20
4
454 Views
Last Modified: 2008-02-01
My Hosting company had applied a security update has been applied to the wev server that has affected my ASP.NET 2.0 code. They are telling me that "inorder to  my  DLLs will need to be modified to use the AllowPartiallyTrustedCallersAttribute class and republished.


They have provided me with the following link for more details on this attribute.
http://msdn2.microsoft.com/en-us/library/system.security.allowpartiallytrustedcallersattribute(VS.80).aspx 


Can any one advice what exactly  i need to do get this working at my end.


0
Comment
Question by:GSK_DEV
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
alecpotts earned 500 total points
ID: 17985950
Hi,

Allowing partially trusted callers on all of your code is a huge security risk. You should only use it with caution, and if absolutely necessary....and if you're sure your code is secure enough and has been through a thorough review...! Have they explained to you exactly WHY this is now necessary??

If I were you, I would seriously consider getting a new hosting company...!!

Some info on partial trust code / environments and risks here:

http://blogs.msdn.com/shawnfa/archive/2005/02/04/367390.aspx

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchSecurityConcernsForVisualBasicNETProgrammers.asp

http://msdn2.microsoft.com/en-gb/library/ms182297(VS.80).aspx

(see section on APCTA - Allow Partially Trusted Callers Attribute)
http://channel9.msdn.com/wiki/default.aspx/SecurityWiki.NETFramework2SecurityChecklist

It sounds like they don't really understand what they're a) doing or b) asking of you. If you DO understand all of the risks and everything else and want to go ahead anyway, what you need to do is add the attribute, above your namespace declaration and below your using statements. It's it the System.Security namespace so you'll need that too..

....
using System.Security;

[assembly:AllowPartiallyTrustedCallers]
.....

Some more info here:
http://vishalsreddy.wordpress.com/tag/aspnet/c/

Hope that helps...
Regards
Alec

0
 
LVL 3

Expert Comment

by:alecpotts
ID: 18027649
Hi GSK_DEV,

Any joy with that??

Alec
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question