security problem asp net 2
hi everyone! i am trying to upload asp net web site to goddady ...the site works good locally but than i upload it and try to brows i get :
Security 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.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
after i searched the web i understand that goddady runs on medium level of security and for my site running good i need to set in AssemblyInfo.cs for my dll's with [assembly:AllowPartiallyTrustedCallers]..
i tried to add manually AssemblyInfo.cs with content of :
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
[assembly: AssemblyTitle("xxx")]
[assembly: AssemblyDescription("xxx")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("xxx")]
[assembly: AssemblyProduct("dal")]
[assembly: AssemblyCopyright("xxxx")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly:AllowPartiallyTrustedCallers]
[assembly: AssemblyVersion("1.0.0.0")]
but it still does not works and i get the same exception of security...
what i need to do that my site will run on medium security level on asp net and that is the right way to do it?
thank you !!!!
|