请问 new FileIOPermission(PermissionState.Unrestricted).Assert();这行是什么作用?而这里未指明要访问哪个路径啊?
我写了个类,将文件上传到服务器上,在本机上可以正常,但服务器上则不行,提示错误:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
// Display the ProgressBar control.
this.progressBar1.Visible = true;
// Set Minimum to 1 to represent the first file being copied.
progressBar1.Minimum = 1;
// Set Maximum to the total number of files to copy.
progressBar1.Maximum = filenames.Length;
// MessageBox.Show(filenames.Length.ToString());
// Set the initial value of the ProgressBar.
progressBar1.Value = 1;
// Set the Step property to a value of 1 to represent each file being copied.
progressBar1.Step = 1;