Solved

Required permissions cannot be acquired.

Posted on 2006-11-20
4
449 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

930 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now