Reputation: 43
I'm still new with facebook C# sdk (ASP.net) I'm using Facebook C# SDK v5 sample "CSASPNETFacebookApp" everything well when in the development machine, but when I upload it on my Godaddy Shared Hosting I got a secuirity exception:
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.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.
Please advise me on how I can fix this? Or its better to change a hosting server?
Upvotes: 2
Views: 1228
Reputation: 1742
<section name="facebookSettings" type="Facebook.FacebookConfigurationSection" requirePermission="false" />
Upvotes: 0
Reputation: 2303
I had this issue and fixed it by adding a "trust level" setting of Full to the system.web section of the web.config file:
<system.web>
<trust level="Full" />
Check out this MSDN article for details and implications of setting this.
Hope this helps.
Upvotes: 6