Answered by:
FTP and GIT seem mutually exclusive - is this nomal?

Question
-
Since setting up git deployment, my ftp files seem to no longer be connected to my site. That is to say, if I were to ftp download and edit a given file, and then ftp upload it again, no changes would show in my site. I would HAVE TO use git and push my changes to see any effect.
Is this correct behaviour? The problem is I cannot do all I need through GIT alone...managing images for example, and certain files.
I also note that in my website settings through the Azure portal, I correctly see my two production databases configured in my production site. However, in my production site's web.config, when accessed through FTP, it has the staging databases configured. So again, it seems that the FTP version of the files is not connected or in any way aware of my git deployed files??
- Edited by Andles67 Wednesday, June 10, 2015 2:08 AM typo
Wednesday, June 10, 2015 2:07 AM
Answers
-
Thank you David, though if I can just double check my understanding with you that would be great.
So, with web.config, it is basically not needed given that the Azure portal web interface will manage these settings for me?? I don't quite follow here as I would need settings in here that are not available through the portal interface.
I think where you say 'updated at runtime' has me confused. What 'runtime' are you referring to? I am assuming you mean when the portal interface makes changes and subsequently writes the web.config??
I think I am clear on the git/ftp deploy thing tho. So if I update, say, an aspx page through FTP, it will become the page that is now 'active' on the site? (to then be overwritten on my next GIT deployment). But, as you say, this will not apply in the hcase of updating the web.config.
Cheers,
Andy- Marked as answer by Andles67 Wednesday, June 10, 2015 4:52 AM
Wednesday, June 10, 2015 4:40 AM
All replies
-
They are not mutually exclusive. Of course, if you modify via FTP a file that came from git, then on the next git deployment you'll get the git file again, overwriting your FTP change. But if you limit FTP use to files that don't come from git, everything should work fine.
As for the connection strings, that is normal behavior. The Azure portal settings never physically modify your web.config. Instead, the changes are applied at runtime. So you will never see your web.config change, regardless of whether you use git or FTP.
David
Wednesday, June 10, 2015 2:45 AM -
Thank you David, though if I can just double check my understanding with you that would be great.
So, with web.config, it is basically not needed given that the Azure portal web interface will manage these settings for me?? I don't quite follow here as I would need settings in here that are not available through the portal interface.
I think where you say 'updated at runtime' has me confused. What 'runtime' are you referring to? I am assuming you mean when the portal interface makes changes and subsequently writes the web.config??
I think I am clear on the git/ftp deploy thing tho. So if I update, say, an aspx page through FTP, it will become the page that is now 'active' on the site? (to then be overwritten on my next GIT deployment). But, as you say, this will not apply in the hcase of updating the web.config.
Cheers,
Andy- Marked as answer by Andles67 Wednesday, June 10, 2015 4:52 AM
Wednesday, June 10, 2015 4:40 AM -
Andy, you still need to have a web.config file with all your other settings. In fact, it would likely have App Settings and Connection Strings that you use for testing.
By 'runtime', I mean that your web.config file is never modified at all. Instead, the Azure settings are turned into environment variables, which then override what's in your web.config. So even though web.config is never modified, your Azure settings do take effect when your app runs.
Wednesday, June 10, 2015 4:44 AM -
Ahh, ok, that makes perfect sense now! Thank you so much for the assistance, very much appreciated.Wednesday, June 10, 2015 4:52 AM