opret mappe asp.net C#
Hej AlleJeg sidder med et lille problem. Jeg vil gerne have mulighed for at oprette en mappe på min server, og jeg prøver at bruge følgende kode:
string foldername = "hejsa"
string thisDir = Server.MapPath("..");
System.IO.Directory.CreateDirectory(thisDir + "\\File\\folder1\\" + foldername);
men jeg får fejlen:
"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."
Har jeg mulighed for at ændre dette så jeg kan få lov til at oprette / slette / flytte mapper?