1

I want to create a temporary folder to store uploads in my application. I've added the folder to my application and it works fine during development.

However when I publish to my test server, the folder doesn't get published unless it has a file in it. On top of that, the permissions are wrong on the folder and I need to manually change them by logging onto the test server and doing it through explorer. I am using ClickOnce WebDeploy to publish to the test server.

Is there a better option than the way I'm doing it? Or some way to set the permissions on the folder at publish time?

dnatoli
  • 6,972
  • 9
  • 57
  • 96

2 Answers2

1

To automate the setting of folder permissions, see http://sedodream.com/2011/11/08/SettingFolderPermissionsOnWebPublish.aspx

To get the folder to be deployed, the easiest way is to just put a dummy file, like a .txt file with nothing in it, in the folder in your project. Web Deploy won't copy a folder that is empty.

tdykstra
  • 5,880
  • 2
  • 23
  • 20
0

The "official" way to do this is to use WebDeploy, however this is not a simple undertaking and requires a lot of work to setup, configure, then create deploy scripts for your site.

You don't mention what method you're using to publish. FTP? File System?

Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291