Hi, I have a problem and still can't solve it, I hope you can help me with this.
I have a web aplication already published in the web. At some point during the execution a report is created and I need it to be saved in our ftp server. How can I do this without using code to upload the file in the ftp server? I mean what I don't want to is generate the file in the client's pc and then upload it to my server. I want to generate and save my file in the ftp server and then download it to the client's pc. My application and ftp server are host in godaddy.
Please I'd appreciate any help with the code, it's pretty urgent :S
Loading
Sam HobbsPosted Apr 19, 2011, 3:39 PM
Cindy SalazarPosted Apr 19, 2011, 10:31 AM
So,I can't seem to save files like this, that's why I tried uploading the files with the command FTPwebrequest but I get this error:
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.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I think it could be due to the security policies of Godaddy, but I'm not sure. I called GoDaddy support but they couldn't solve the problem either.
So, any ideas on how I can save or upload my files through the code of my website??
Thanks for the help.
Sam HobbsPosted Apr 18, 2011, 7:47 PM
The best solution would be to determine what the local directory is and then write to it. If you need to get security permission to write to it then talk with your security person or manager or whoever you need to.
There is something confusing here. You say that the FTP server is hosted by GoDaddy and you say that the application and ftp server are both on same server; in other words, Suthish asked if they are the same compuyer and you said they are. Are you sure that the application is executing in the GoDaddy system? Probably they are not, so please be sure what the answer is to that question. If it is one system, then the next step would be to determine if you can write directly to the local directory.
Cindy SalazarPosted Apr 18, 2011, 6:19 PM
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.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Could you help me with any of those errors? I tried uploading the file because I couldn't get to save the file in the ftp server with just the path.. but there should be some way to do it, right?
By the way both my application and ftp server are hosted in godaddy.
I'd appreciate any help
Suthish NairPosted Apr 18, 2011, 6:06 PM
Cindy SalazarPosted Apr 18, 2011, 4:58 PM
Suthish NairPosted Apr 18, 2011, 4:13 PM