我们有一个ASP.NET 2.0应用程序,可以作为试用版下载。因此,我们无法控制将要安装的环境。尽管我们努力生产可靠的安装程序,但我们仍然会让很多用户报告问题。
我们使用Web部署项目生成已编译的.net文件。然后,我们获取输出并通过VS 2010部署项目运行它以生成msi安装程序。
以下是我们遇到的几个问题:
我们之前尝试过使用InnoSetup安装程序。它在某种程度上起作用,但我们遇到了安装的应用程序连接到错误的应用程序池的问题,并且从未找到通过InnoSetup脚本定义应用程序池的方法。
有人可以给我一个明确的列表,列出在Windows XP或更高版本的配置未知的计算机上启动并运行ASP.NET应用程序所需的内容吗?例如检查是否安装了.NET 2.0,检查安装了II6,将文件复制到x,创建虚拟目录等。
更好的是,是否有人知道安装程序(或InnoSetup扩展程序)可以为您完成大部分设置?
答案 0 :(得分:2)
要在开发或生产服务器上部署版本,请按照以下步骤操作。
如果您发现它有用,请将其标记为您的答案,否则请告诉我......
答案 1 :(得分:0)
您可以使用Installshield开发满足您要求的安装程序。 它具有支持根据IIS创建和删除虚拟目录,在目标系统上复制数据,验证操作系统等所有的功能。
答案 2 :(得分:0)
如果您使用外部.dll(程序集),那么您也必须部署它们。例如:如果应用程序使用Crystal报表(CR),则必须在生产计算机上安装CR运行时包。还要确保所有文件都已导入到项目中,并且您的应用程序不会在本地计算机中查找其文件(项目目录旁边)。
答案 3 :(得分:0)
在审核完所有选项后,我决定保留msi安装程序,但在inno安装脚本中添加先决条件检查。
这是脚本
procedure DialogInfo(const Msg: String);
begin
MsgBox(Msg , mbInformation, mb_OK);
end;
function IISInstalled: Boolean;
begin
Result := RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\InetStp');
end;
function GetIISMajorVersion: Integer;
var
Vers: Cardinal;
begin
if (IISInstalled) and
(RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\InetStp', 'MajorVersion', Vers)) then
Result := Vers
else
Result :=0;
end;
function IISManagementConsoleInstalled: Boolean;
var
IIS: Variant;
begin
try
IIS := CreateOleObject('IISNamespace');
Result := TRUE;
except
Result := FALSE;
end;
end;
function WindowsMinorVersion: Integer;
var
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
Result := Version.Minor;
end;
function WindowsMajorVersion: Integer;
var
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
Result := Version.Major;
end;
function WindowsServer: Boolean;
var
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
Result := Version.ProductType = VER_NT_SERVER;
end;
function IsWindows7: Boolean;
begin
Result := (WindowsMajorVersion = 6) and (WindowsMinorVersion = 1) and (not WindowsServer);
end;
function IsWindowsVista: Boolean;
begin
Result := (WindowsMajorVersion = 6) and (WindowsMinorVersion = 0) and (not WindowsServer);
end;
function IsWindowsXP: Boolean;
begin
Result := (WindowsMajorVersion = 5) and (WindowsMinorVersion = 1) and (not WindowsServer);
end;
function IsWinServer2003: Boolean;
begin
Result := (WindowsMajorVersion = 5) and (WindowsMinorVersion = 2) and (WindowsServer);
end;
function IsWinServer2008: Boolean;
begin
Result := (WindowsMajorVersion = 6) and ((WindowsMinorVersion = 0) or (WindowsMinorVersion = 1)) and (WindowsServer);
end;
function IsHomeEdition: Boolean;
var
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
Result := Version.SuiteMask AND VER_SUITE_PERSONAL <> 0 ;
end;
function CheckIISPrerequisites: Boolean;
var
IISVersion: Integer;
Msg: String;
begin
Result := FALSE;
case GetIISMajorVersion of
0:
begin
if IsHomeEdition then
Msg := 'The Easy-IP Web Server requires Internet Information Services (IIS). IIS cannot be installed on the Home edition of Windows.'
else
begin
Msg := 'The Easy-IP Web Server requires Internet Information Services to be enabled on this machine. To enable IIS: ' +#10 + #10;
if IsWindowsXP then
Msg := Msg + '1) Open Control Panel then Add or Remove Programs.' + #10 +
'2) Click on Add/Remove Windows Components.' + #10 +
'3) Find Internet Information Services (IIS) amd check it.' + #10 +
'4) Click Next then Finish.' else
if IsWinServer2003 then
Msg := Msg + '1) Open Manage Your Server' + #10 +
'2) Click on Add or Remove a Role.' + #10 +
'3) Click Next.' + #10 +
'4) Select Application server (IIS, ASP.NET)' + #10 +
'5) Click Next.' + #10 +
'6) Check Enable ASP.NET.' + #10 +
'7) Click Next, then Next again.' else
if IsWinServer2008 then
Msg := Msg + '1) Open Server Manager.' + #10 +
'2) Click on Roles.' + #10 +
'3) Click Add Roles.' + #10 +
'4) When the Wizard appears, click Next.' + #10 +
'5) Find Web Server(IIS) and check it.' + #10 +
'6) Click Next twice.' + #10 +
'7) Find Application Development and check it.' + #10 +
'8) Find IIS 6 Management Compatibility (under Management Tools) and check it along with all it''s children.' + #10 +
'9) Click Next, then Install.'
else
// Vista, Win7 or later
Msg := Msg + '1) Open Control Panel then Programs and Features.' + #10 +
'2) Click on Turn Windows Features on or off.' + #10 +
'3) Check Internet Information Services.' + #10 +
'4) Under the Internet Information Services node, expand Web Management Tools and check IIS Management Console.' + #10 +
'5) Click OK.';
end;
end;
5, 6:
begin
Result := IISManagementConsoleInstalled;
if not Result then
Msg := 'Unable to install the Easy-IP Web Server as the IIS Management Console could not be initiated. Please contact support@easy-ip.net for more information.';
end;
7:
begin
Result := IISManagementConsoleInstalled;
if not Result then
begin
Msg := 'Internet Information Services is installed, but in order to install the Easy-IP Web Server, you must also enable the IIS Management Console. To enable the IIS Management Console:' + #10 + #10;
if WindowsServer then
Msg := Msg + '1) Open Server Manager and click on Roles.' + #10 +
'2) Under Web Server (IIS), click Add Role Services.' + #10 +
'3) Find Application Development and make sure it''s checked.' + #10 +
'4) Find IIS 6 Management Compatibility (under Management Tools) and check it along with all it''s children.' + #10 +
'5) Click Next, then Install.'
else
Msg := Msg + '1) Open Control Panel then Programs and Features.' + #10 +
'2) Click on Turn Windows Features on or off.' + #10 +
'3) Under the Internet Information Services node, expand Web Management Tools then check IIS Management Console.' + #10 +
'4) Click OK.';
end;
end;
end; // of case
if not Result then
DialogInfo(Msg);
end;
答案 4 :(得分:0)
Window PI适用于Windows XP SP3 +(及更高版本),并为Web开发服务器提供了先决条件。
http://www.microsoft.com/web/downloads/platform.aspx
举手示意 - 我自己没有尝试过,但我还是试着去开发服务器。你可能会感兴趣