[英]What is the PreserveLoginUrl appSetting key/value in an ASP.NET MVC application?
[英]What are the prerequisites for installing an ASP.NET application?
我們有一個ASP.NET 2.0應用程序,可以作為試用版下載。 因此,我們無法控制將要安裝的環境。 盡管我們努力生產可靠的安裝程序,但仍然有很多用戶報告問題。
我們使用Web部署項目生成編譯的.net文件。 然后,我們獲取輸出並通過VS 2010部署項目運行它以生成msi安裝程序。
以下是我們遇到的幾個問題:
我們之前嘗試過使用InnoSetup安裝程序。 它在某種程度上起作用,但是我們遇到了安裝的應用程序連接到錯誤的應用程序池的問題,並且從未找到通過InnoSetup腳本定義應用程序池的方法。
有人可以給我一個明確的列表,列出在Windows XP或更高版本的配置未知的計算機上運行和運行ASP.NET應用程序所需的內容嗎? 例如,檢查.NET 2.0是否已安裝,檢查是否安裝了II6,將文件復制到x,創建虛擬目錄等。
更好的是,是否有人知道安裝程序(或InnoSetup擴展程序)可以為您完成大部分設置?
要在開發或生產服務器上部署發行版,請執行以下步驟。
如果您發現它有用,請將其標記為您的答案,否則請告訴我...
您可以使用Installshield開發滿足您要求的安裝程序。 它具有支持根據IIS創建和刪除虛擬目錄,在目標系統上復制數據,驗證操作系統等所有的功能。
如果您使用外部.dll(程序集),那么您也必須部署它們。 例如:如果應用程序使用Crystal報表(CR),則必須在生產計算機上安裝CR運行時包。 還要確保所有文件都已導入到項目中,並且您的應用程序不會在本地計算機中查找其文件(項目目錄旁邊)。
在查看了所有選項后,我決定保留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;
Window PI適用於Windows XP SP3 +(及更高版本),並為Web開發服務器提供了先決條件。
http://www.microsoft.com/web/downloads/platform.aspx
舉起手來 - 我自己沒有嘗試過,但我會為開發服務器試一試。 你可能會感興趣
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.