Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top