简体   繁体   English

如何使我的ASP.NET应用程序可在任何主机上安装

[英]How to make my ASP.NET Application Installable on any host

How can I make a setup version from my web application that will allow any user who have the required files to : 如何从Web应用程序制作安装版本,该版本将允许拥有所需文件的任何用户执行以下操作:

  • Provide initial information through a simple interface or editing a file that is required for the website to start (The admin user and password, the production database credentials, etc) 通过简单的界面或编辑网站启动所需的文件来提供初始信息(管理员用户和密码,生产数据库凭据等)

  • Copy the database schema (my application's ordinary tables + the membership tables) 复制数据库模式(我的应用程序的普通表+成员资格表)

...There's a point I'd like to learn more about but it's not that important at the moment but if you have a link or an idea, it would be great: how to protect my application from users who might buy it and share a copy of it on the internet or with friends! ...有一点我想了解更多,但目前并不重要,但是如果您有链接或想法,那将是很棒的:如何保护我的应用程序免受可能购买和共享它的用户的侵害在互联网上或与朋友一起复制它!

EDIT 编辑

Sorry for replying this late! 很抱歉这么晚回复! I was kinda sick yesterday .. Thanks for your time and I'm commenting on your answers right now :) 昨天我有点恶心..谢谢您的时间,我现在就您的回答发表评论:)

EDIT 2 编辑2

AGAIN! 再次! .. for who ever voted down my question, please leave an explanation so people including the question owner would learn or put some light on a confusion .. just down-voting it and run is just about you satisfying your need to down vote a question you think might be worng! ..对于曾经投票否决我问题的人,请留下解释,以便包括问题所有者在内的人们可以学习或了解一些困惑。.只需对它投下反对票并运行就可以满足您对问题投下反对票的需要。您认为可能会感到厌倦! =) =)

The only way that I am aware of is creating a installer with Visual Studio, so forgive my ignorance if their is a better way. 我知道的唯一方法是使用Visual Studio创建安装程序,因此,如果它们是更好的方法,请原谅我的无知。

You could implement a licensing system on the web application, where it calls a remote server to authenticate every time the application is started (Global.asax). 您可以在Web应用程序上实施许可系统,该系统在每次启动应用程序时都会调用远程服务器进行身份验证(Global.asax)。

And for deployment you could create a Application where the user has to input a license key. 对于部署,您可以创建一个应用程序,用户必须在其中输入许可证密钥。 You then contact your server (website) and authenticate the key. 然后,您与服务器(网站)联系并验证密钥。 If the key is valid you download all the required files to the user's computer (In a .zip file). 如果密钥有效,则将所有必需的文件下载到用户的计算机(.zip文件中)。 Then ask for all the configuration values (Admin user name, password, database name, database host) and create the database schema and copy over the required files, for the website, to their hosting server. 然后,询问所有配置值(管理员用户名,密码,数据库名称,数据库主机)并创建数据库架构,然后将网站所需的文件复制到其托管服务器。

Just a idea, haven't implemented something like this but it should work in theory. 只是一个想法,还没有实现这样的东西,但是它应该在理论上起作用。

Really depends on the definition of "any host" as there are lots of things one can do on a dedicated box that you can't on a shared box. 确实取决于“任何主机”的定义,因为在专用盒上可以执行很多操作,而在共享盒上则不能执行。 In any case, if I had to do this today, I would look at creating a wevb deployment package. 无论如何,如果我今天必须这样做,我将考虑创建wevb部署程序包。 That will work on anything running 2008, which is most commercial outfits. 这将适用于运行2008年的大多数商业服装。 It will also hand db deployment and config tweaking. 它还将进行数据库部署和配置调整。

Regarding rights management, the best bet is some sort of system where the app has to ping your service to check licensing -- pretty much the only foolproof way. 关于权限管理,最好的选择是某种系统,在该系统中,应用程序必须ping您的服务以检查许可-这几乎是唯一的万无一失的方法。 Of course, unless you got something real special, most people won't bother with anything so encumbered and will likely look elsewhere for a solution. 当然,除非您有真正的特别之处,否则大多数人不会为如此麻烦的事情所困扰,并且可能会在其他地方寻求解决方案。 If you are paying, you might as well go turnkey IMHO. 如果您要付款,最好还是交钥匙IMHO。

Not to steal answer thunder away from @Wyatt, but this may be the answer that @IKashef is looking for: 不要从@Wyatt那里窃取答案,但这可能是@IKashef寻找的答案:

Visual Studio 2010 has a feature to package and publish projects to IIS 7 very easily. Visual Studio 2010具有很容易将项目打包和发布到IIS 7的功能。 Please note the following article that walks through how to do this: http://weblogs.asp.net/gunnarpeipman/archive/2009/06/18/visual-studio-2010-web-application-packaging-and-publishing.aspx 请注意以下文章,该文章介绍了如何执行此操作: http : //weblogs.asp.net/gunnarpeipman/archive/2009/06/18/visual-studio-2010-web-application-packaging-and-publishing.aspx

It isn't an installer, but it allows for easy deployments from your environment to others. 它不是安装程序,但是它允许从您的环境轻松部署到其他环境。 I've read, but can't find articles on how to make this automated into a "standalone installer". 我已阅读,但找不到有关如何使它自动成为“独立安装程序”的文章。 I've worked with TFS to use this to deploy to testing servers. 我已经与TFS一起使用它来部署到测试服务器。

This talks about the 1-click publish a little more: http://vishaljoshi.blogspot.com/2009/05/web-1-click-publish-with-vs-2010.html 这将讨论有关单击单击的更多信息: http : //vishaljoshi.blogspot.com/2009/05/web-1-click-publish-with-vs-2010.html

Information about the IIS 7 web deployment tools: http://blogs.iis.net/drobbins/archive/2008/01/23/new-web-deployment-tool-for-iis7.aspx 有关IIS 7 Web部署工具的信息: http : //blogs.iis.net/drobbins/archive/2008/01/23/new-web-deployment-tool-for-iis7.aspx

Hopefully this will give you some food for thought. 希望这会给您带来一些思考。 I know it isn't a 100% solution type answer, but deploying/installing a web application is a very open ended question. 我知道这不是100%解决方案类型的答案,但是部署/安装Web应用程序是一个非常开放的问题。 Questions like, "if and how are you delivering code to your customers" or "are you doing your own hosting" are important to answer first. 首先要回答诸如“是否以及如何向客户交付代码”或“您自己进行托管”之类的问题。

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

相关问题 如何在GoDaddy上托管我的ASP.NET应用程序? - How to host my ASP.NET Application on GoDaddy? 在本地托管ASP.NET应用程序 - Host ASP.NET application locally 如何在我的ASP.Net MVC 5应用程序的同一页中进行编辑和删除POST请求 - How to make edit and delete POST Request in same page in my ASP.Net MVC 5 application 在我的 asp.net 核心 MVC web 应用程序中,我如何使验证码成为必填字段 - Inside my asp.net core MVC web application how i can make the recaptcha a required field 如何使ASP.NET MVC应用程序使用我的成员资格表? - How do I make an ASP.NET MVC application use my Membership tables? 如何在一段时间内自动调用我的方法而无需在ASP.net C#中的应用程序中运行任何WebPage? - How to Auto Call My Method In Time Period Without Running any WebPage in my application in ASP.net C#? 如何使ASP.NET网站与TCP服务器应用程序通信 - How to make a ASP.NET website communicate with TCP server application 如何使ASP.NET MVC应用程序保持编译状态 - How to make an asp.net mvc application to stay compiled 如何使ASP.NET应用程序缓存持久化 - How to make ASP.NET Application Cache Persistent 如何使Asp.net Web应用程序调试时间缩短? - How to make Asp.net Web Application Debug time shorter?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM