tag:support.appharbor.com,2010-11-23:/discussions/problems/74714-application-content-when-deployingAppHarbor: Discussion 2015-01-22T16:45:08Ztag:support.appharbor.com,2010-11-23:Comment/358299682015-01-21T10:02:09Z2015-01-21T10:02:09ZApplication content when deploying<div><p>Hi,</p>
<p>Happy to help with your questions:</p>
<ol>
<li>Yes you can enable file system write access to create files and
folders in your application's root folder. File system write access
can be enabled on the application's "Settings" page.<br></li>
<li>You're right, the files you write (to either
<code>App_Data</code> or the root folder when write access is
enabled) are wiped on subsequent deployments. This also means it
should only be used for temporary files, caches etc. If you need to
persist files I'd recommend using a cloud storage solution such as
Amazon S3. S3 have good .NET libraries that makes it easy to
accomplish pretty much any file-related tasks in a scalable and
"cloud-ready" manner.<br></li>
<li>The files in your <code>Content</code> files should be
accessible in the same way you usually use them. However you have
to make sure they're copied to the build output directory when you
application is built - for instance by referencing the files and
setting the <code>Build Action</code> property to
<code>Content</code>. You can also download the build artifact on
the build log pages to verify that the files are copied and
deployed as you' expect.</li>
</ol>
<p>I hope this helps!</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/358299682015-01-21T18:05:20Z2015-01-21T18:05:20ZApplication content when deploying<div><p>Thank you very much, you helped me a lot. Just one more thing
about the third problem:</p>
<p>The thing is that I'm referencing image from Content folder in
my css ( as background ) which is also in Content folder. On my
localhost it's working very good but when deployed it' can not find
a file.</p>
<p>Can you just tell me if this is the right way to do it?</p>
<h2><a class="anchor" name="folder-structure-" href=
"#folder-structure-" id="folder-structure-"></a>Folder
structure</h2>
<p>Content/ a17.png<br>
Content/ style.css</p>
<h2><a class="anchor" name="style-css-" href="#style-css-" id=
"style-css-"></a>style.css</h2>
<p>background: url(/Content/a17.png) no-repeat;</p></div>kcrnactag:support.appharbor.com,2010-11-23:Comment/358299682015-01-22T13:58:45Z2015-01-22T13:58:45ZApplication content when deploying<div><p>I'd assume that's because the files aren't copied to the output
directory as expected. Can you verify that the <code>Build
Action</code> is properly set on the file reference, and that the
file is copied to the output directory? Otherwise let me know the
name of the application and I can take a closer look.</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/358299682015-01-22T14:56:46Z2015-01-22T14:56:46ZApplication content when deploying<div><p>It worked. Thank you very much and have a good day.</p></div>kcrnactag:support.appharbor.com,2010-11-23:Comment/358299682015-01-22T16:45:06Z2015-01-22T16:45:06ZApplication content when deploying<div><p>Great, glad it worked out!</p>
<p>Best,<br>
Rune</p></div>rune