It seems .NET Framework 4.0 doesn't allow to rename a file with a full directory path. So, we have to only include the file name. This is a major problem. I need to upload into a temporary directory. Then, I need to rename that file so it would appear in the production directory. I cannot upload directly into the production directory as the master file should be running up until the last second before I delete it and rename the temporary file into the production directory. So, basically, before, it was going like this:
1. Upload into Temp\Something.dll
2. Delete Bin\Something.dll
3. Rename Temp\Something.dll to Bin\Something.dll
But, now, I can only make the RenameTo to work like this:
1. Upload into Temp\Something.dll
2. Rename Something.dll to Something2.dll
There is no move command with WebRequestMethods. So, the only way I have found so far to move a file into another directory is to use the RenameTo command. But, this doesn't work anymore and gives 553 File name not allowed.
Anyone would have a suggestion on how to resolve that issue?