源代码控制/ASP.NET MVC 2 维护 - 从 Win7 笔记本电脑到 IIS7 生产服务器
首先,我不确定是否应该将这个问题分成更小的、单独的问题。它们是相关的,但我不确定我是否做错了。抱歉,如果我是的话。
我对源代码/版本控制的想法有点陌生。我已经在我的开发笔记本电脑上安装了 TortoiseSVN,但还没有真正养成使用它的习惯。也就是说,我有一个正在运行的(目前还小得令人尴尬的)ASP.NET MVC 2 站点,很快就需要升级,我很好奇最好的方法是什么。另一个问题是,该网站目前不使用数据库,但很快就会使用。我已经在服务器上安装了 SQL Server 2008 R2。
那么,有没有办法让我使用 Subversion 将站点的更新版本推送到服务器?或者让服务器拉它?
使用VS 2010自带的版本控制会更好吗?
数据库呢?当我在解决方案中设置数据库及其数据时,如何将其移植到服务器?我需要手动写入数据库吗?
显而易见的选择是简单地用新版本覆盖现有的 .dll 并上传新的静态内容,但这对我来说似乎有点过时。
First, I'm not sure if I should break this question into smaller, individual questions. They're related, but I'm not sure if I'm doing it wrong. Apologies if I am.
I'm a bit new to the idea of source/version control. I have installed TortoiseSVN on my development laptop, but haven't really gotten into the habit of using it. That said, I have a live (and embarrassingly small, at the moment) ASP.NET MVC 2 site that will be in need of upgrading soon, and I'm curious as to what the best way to go would be. As an added wrinkle, the site does not currently use a database, but it will relatively soon. I've already installed SQL Server 2008 R2 on the server.
So, is there a way for me to use Subversion to push an updated iteration of my site to the server? Or to have the server pull it?
Would it be better to use the version control that comes with VS 2010?
What about the db? When I set up the db and its data in my solution, how would I port that over to the server? Would I have to manually write to the db?
The obvious option is to simply overwrite the existing .dll with the new build and upload new static content, but that seems a bit archaic to me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您最好将其分成多个问题。
我希望这能有所帮助。
You would do better to split this up into multiple questions.
I hope that helps a bit.
@Kevin:
看一下 MSDeploy,它是 VS2010 的一部分。我不熟悉它处理数据库更新的方式,但就处理 ASP.Net 网站以及任何与此相关的网站的部署而言,它应该是划算的。
类似的东西的好处是,您可以使用它在新网站上推出,在生产环境中测试它,然后使您的 URL 引用使用新网站,而不是更新实时网站并在最后查找某些内容某处破裂。
@Kevin:
Take a look at MSDeploy, which is part of VS2010. I'm not familiar with its handling database updates, but as far as handling the deployment of ASP.Net websites, and any websites for that matter, it's supposed to be on the money.
What's great with something like that is you can use it to roll out on a fresh website, test it in the production environment, and then make your URL references use the new site, instead of updating the live site and finding at the very end something breaks somewhere.