简体   繁体   English

在DNN中自动安装模块/扩展(DotNetNuke)

[英]Automatically Install Module/Extension in DNN (DotNetNuke)

Does anyone know if there is a way of automatically installing an extension on DNN using .net ? 有谁知道是否有使用.net 在DNN自动安装扩展的方法?

It used to be possible using the infamous Install.aspx page, which has been removed for security reasons. 过去可以使用臭名昭着的Install.aspx页面,该页面出于安全原因已被删除。

I've tried refactoring the code within Install.aspx so as to automate this, or even run it for a single module, but no luck. 我已经尝试在Install.aspx重构代码以便自动执行此操作,甚至为单个模块运行它,但没有运气。 I've just got to the point where the zip has gets unpackaged, but what I really want is to know which and how the tables in the Sql Server database get modified . 我已经到了解压缩zip的地步,但我真正想知道的是知道Sql Server数据库中的表被修改的内容和方式

I would appreciate any pointers on this. 我将不胜感激。

It is quite hard to find all the tables that get updated, as well as the data that gets put into them. 很难找到所有更新的表,以及放入它们的数据。

My solution was is to simply call a copy of the installation page , which can be done from, say, a desktop app. 我的解决方案是简单地调用安装页面的副本 ,这可以从桌面应用程序完成。 For some reason the original Install.aspx won't run if you add it to the DNN installation. 出于某种原因,如果将其添加到DNN安装中,则原始Install.aspx将无法运行。 Step by step: 一步步:

  1. Find the Install.aspx and Install.aspx.cs files. 找到Install.aspxInstall.aspx.cs文件。 They are deleted after the first installation, but you can get them from the original download. 它们在第一次安装后被删除,但您可以从原始下载中获取它们。

  2. Make a copy of these two files and rename them, eg MyInstall.aspx and MyInstall.aspx.cs 复制这两个文件并重命名 ,例如MyInstall.aspxMyInstall.aspx.cs

  3. In Visual Studio run the DNN installation as a web site , not as a web project. 在Visual Studio中,将DNN安装作为Web站点运行 ,而不是作为Web项目运行。

  4. Now the page MyInstall will work just as the Install did. 现在, MyInstall页面将像Install一样工作。 You can pass the parameters in the url. 您可以在网址中传递参数。

  5. Before you call the page, you need to put your module packages into the corresponding folder eg for modules install/module of the DNN Installation. 在调用页面之前,需要将模块包放入相应的文件夹中,例如DNN安装的模块install/module To create the module package use Christoc's VS templates . 要创建模块包,请使用Christoc的VS模板

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

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