tags:

views:

68

answers:

1

Hello

I would like help with the following asp.net error i now have after deploying my app to live

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Most posts say to edit the web config file and allow trust. I read this http://msdn.microsoft.com/en-us/library/tkscy493.aspx but am not really able to make sense of it.

If it helps to clarify things. I can connect to the database and retrieve results using LINQ.dbml DataContext. However when I try and assign the results to a Object, say for example.. The Data context is an external project compiled to a dll and put in the bin folder.

DataContext db = new DataContext("connectionstring");
var bankUser = (from u in db.Bankers
where u.banker_email == TXT_user.Text
&& u.banker_password == TXT_pass.Text
select u).Single();

it throws the error posted above.

I only have access via a control panel so any changes will have to be in web.config. I have set the project to have its own application pool.

any ideas appreciated.

+2  A: 

Hai Kieran, In your web config,

Try this<trust level="Full"/> and we ll see what happens.... Just try it...

Source Forums.asp.net

Pandiya Chendur
Kieren What happened?
Pandiya Chendur
@pandiya: Hey there. Thanks for the response. I have an configuration error with that put in the <system.web> I will look into how to fix this. On a side note what are the security implications when doing this.
Kieran
@Kieren: Hai may be go through this it will give you a clear picture about trust level in a web application http://msdn.microsoft.com/en-us/library/tkscy493.aspx
Pandiya Chendur
a publicly exposed fully trusted application is a potential platform for hackers to launch attacks. The less an application is trusted, the more secure that application happens to be.
Pandiya Chendur
Got this sys admin to set it to full trust. It is now working no problems - Thanks Pandiya
Kieran
Ok Let me know if any other issues you across with security and by the way u r always welcome....
Pandiya Chendur