Hi Guys !!
sure many people had this problem w godaddy before , so i do have it now but i dont know how to solve it !!
i want to use teh Fileupload component to on my page to upload a .csv and read the file (I DONT WANT TO SAVE IT IN THE WEB HOSTING)
I'am the Fileupload to upload and read the file line by line in my local env. buy when i try to upload it gives a the following error:
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.
what do i have this error if I am NOT trying to save the file ?
My code:
filestream = File.OpenText(System.IO.Path.GetFullPath(FileUpload1.PostedFile.FileName.ToString))
dim readcontents As String
readcontents = filestream.ReadToEnd()
Dim rowdelimiter As String
rowdelimiter = Chr(13) & Chr(10)
...............
p.s the directory were the page is located has read/write permissions
any idea ??
thanks for your time
CA