Solved

Required permissions cannot be acquired.

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

706 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

18 Experts available now in Live!

Get 1:1 Help Now