简体   繁体   English

提供本地(Intranet)托管的MVC ASP.NET网站的策略

[英]Strategies for providing locally (intranet) hosted MVC ASP.NET website

platform: ASP.NET 4.5, MVC 4, C# 平台:ASP.NET 4.5,MVC 4,C#

I'm currently designing a website that's available on the public domain. 我目前正在设计一个可在公共领域使用的网站。 However, there is a meaningful % of my target market that would be uncomfortable putting some information on a public site, even if it's https etc. 但是,在我的目标市场中有相当大的百分比,即使是https等信息,在公共网站上放一些信息也不会令人感到不适。

What I'd like to be able to do is allow corporate users use my site, and one way to do that is to allow them to host my website on their intranet. 我想做的是允许公司用户使用我的网站,而做到这一点的一种方法是允许他们在其Intranet上托管我的网站。 The usual disadvantages are, of course, that they don't get their site updated as fast as the public one would, and it's also a headache for me in terms of support. 当然,通常的缺点是,它们的网站更新速度不如公众网站更新的速度快,在支持方面,这也让我头疼。

My questions are 我的问题是

  1. What are some strategies to make "corporate friendly" deployments easy and hassle-free? 有什么策略可以使“企业友好型”部署变得容易且轻松自如?

  2. Are there ways I could keep the site public with just the database inside the intranet (can't see how... but then I'm no techno-know-all) 有什么方法可以使站点仅通过Intranet内部的数据库保持公开状态(看不到...但是然后我什么都不知道)

  3. If I have no choice but to make it locally hosted - then what's the best way to do it to keep my development/support overheads at a minimum? 如果我别无选择,只能在本地托管-那么最好的方法是将开发/支持开销保持在最低水平?

I hope the mods don't lock this. 我希望国防部不要锁定这个。 I'm asking for specific methods and technical approaches to a very real problem. 我要针对一个非常实际的问题的特定方法和技术方法。

Thank you, 谢谢,

For #1, there's a many facets to the question. 对于#1,这个问题有很多方面。 A couple thoughts that might help you think it out: 有一些想法可能会帮助您进行思考:

  1. Deploying your app : Make it simple to deploy, and to upgrade, between versions of your application. 部署应用程序 :简化应用程序版本之间的部署和升级。 Try to make it happen as a single operation, not upgrading different parts by hand manually. 尝试使它成为单个操作,而不是手动手动升级不同的部件。 As Darin Dimitrov mentioned, you could look into a technology like Web Deployment Packages, especially with Visual Studio 2012 which will have incremental database publishing (in VS2010, the database was non-incremental so there wasn't really an "update" story). 正如Darin Dimitrov所提到的,您可以研究类似Web Deployment Packages的技术,尤其是在Visual Studio 2012中,它将具有增量数据库发布功能(在VS2010中,数据库是非增量的,因此并没有真正的“更新”故事)。 Keep the cost of deployment down so that they can afford to upgrade more frequently (not the cost of your product, but the overhead of who's getting paid to keep the system updated and running). 降低部署成本,以便他们可以负担得起更频繁的升级(不是产品成本,而是谁需要付费以保持系统更新和运行的开销)。
  2. Consider differences between running on the Internet and on an Intranet : For example, authentication on the Internet is usually done with forms based authentication. 考虑在Internet和Intranet上运行之间的区别 :例如,Internet上的身份验证通常使用基于表单的身份验证来完成。 On an intranet, you may want to consider supporting Windows authentication for a seamless login experience for corporate users. 在Intranet上,您可能要考虑支持Windows身份验证,以为企业用户提供无缝的登录体验。 This should impact your designs to allow authentication to be modular between your deployments. 这将影响您的设计,以允许在部署之间对身份验证进行模块化。
  3. Corporate adoption of newer technologies might be slower than you want : You're using the latest and greatest (ASP.NET 4.5/MVC4). 公司采用较新技术的速度可能比您想要的慢 :您使用的是最新和最先进的(ASP.NET 4.5 / MVC4)。 Some companies might not be prepared to deploy this now, or for a couple years. 一些公司可能不准备现在或几年内部署它。 Consider if you could use an older, established technology, such as .NET 4 - having been out for a few years, it's already somewhat proven and has adoption. 考虑一下是否可以使用较老的,成熟的技术,例如.NET 4-已经使用了几年,它已经得到了一定程度的验证并已被采用。

For your 2nd question, it comes down to what their IT is willing to accommodate. 对于您的第二个问题,这取决于他们的IT部门愿意解决的问题。 Many corporate sites have the database within a secured LAN, but the web server is accessible from the public Internet. 许多公司站点的数据库都在安全的LAN中,但是可以通过公共Internet访问Web服务器。 It's certainly a well-understood network design, but depending on the assets involved in your application, your customers may or may not agree to it. 这当然是一个易于理解的网络设计,但是根据您的应用程序所涉及的资产,您的客户可能同意也可能不同意。 This one's a business decision. 这是一个商业决定。

For #3 the answer is common to any long term software project. 对于#3,答案对于任何长期软件项目都是通用的。 It has to be high quality and maintainable if you want to minimize the hassle. 如果要最大程度地减少麻烦,它必须是高质量的且可维护的。

  • If you're only going to support the last N versions, make that very clear. 如果仅支持最新的N个版本,请明确说明。 Avoid supporting code that you're already fixed long in the past. 避免支持过去已经修复的代码。 Consider providing extra support or affordable upgrades to keep your customers on newer (and hopefully better) releases. 考虑提供额外的支持或负担得起的升级,以使您的客户使用新的(最好是更好的)版本。
  • Keep in mind what components need to be upgraded between versions. 请记住,哪些组件需要在版本之间进行升级。 Your web app (obviously), but also your database schema and any dependencies or libraries you're using. 您的Web应用程序(很明显),还包括您的数据库架构以及所使用的任何依赖项或库。 This is mostly the same considerations as #1. 这与#1基本相同。 Make sure you have a good plan for upgrades and rollbacks. 确保您有一个良好的升级回滚计划。
  • Most importantly, test, test, test . 最重要的是, 测试,测试,测试 Have functional regression tests and install/upgrade tests, and try out as many possibilities as you can think of. 进行功能回归测试和安装/升级测试,并尝试尽可能多的可能性。

Answer to only 1) above. 仅回答上述1)。 I would recommend a continuous integration tool. 我建议使用持续集成工具。 We use TeamCity and deploy mvc3 and mvc4 applications to our public as well as privately hosted sites with a click of a button. 我们使用TeamCity并通过单击一个按钮将mvc3和mvc4应用程序部署到我们的公共站点和私有站点。 Previously, we used cruise control, but now we are more satisfied with TeamCity. 以前,我们使用巡航控制,但现在我们对TeamCity更加满意。 Read up on them. 阅读他们。 Might lead you in the right direction. 可能会引导您朝正确的方向前进。

You may checkout Visual Studio's Web Deployment Packages . 您可以签出Visual Studio的Web部署包 They allow you to prepare a package that could directly be installed on your client's web servers. 它们使您可以准备可以直接安装在客户端的Web服务器上的软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM