.Net web application deployment options
I've been around the block quite a bit and there are only two ways I use to deploy a web application.
The first is to use the Publish command in visual studio. The second is to run msdeploy from our build server.
Today I ran into a personn开发者_Python百科el issue. An off site team I'm working with just copies the whole project including solution files, source code, everything to the server.
When I asked them about this they said that it took too long to run the publish command and it was just easier to do a copy paste of the whole source tree.
The project does have config transformations, which they are doing manually.
But beyond that what are the reasons NOT to push source code onto the server?
- It takes up hard disk space.
- Somebody with access to the server could not only read the code but also alter it. This could be a well-intentioned authorized person or an outsider with malicious intent who has breached server security.
- You don't know for sure that what you copied out there will compile.
Just an initial thought and something I have a HUGE gripe with:
To stop incompetent thinkers from editing live on the server, even though they 'think' it's only a tiny, non-problem provoking change! When really it DOES cause problems and ISN'T in source control!
Also, things like solution files, user files, version control files, all potentially hold sensitive information not related to the deployed instance of the application, obviously having non-required items on the server is not desirable anyway, not to mention in this case.
We don't use the publish or msdeploy options for web site projects that are large. It's too easy for code that hasn't been tested to be branched into a production area by mistake. Instead our work items are intended to be moved on a file-by-file basis by a third party not related to the development team.
It's an automate-able process that just hasn't been completely automated at this point because we're switching bug/defect tracking software at the moment.
精彩评论