2011-08-29 8 views
7

試用版としてダウンロードできるASP.NET 2.0アプリケーションがあります。そのため、我々はそれがインストールされる環境を制御することができません。信頼性の高いインストーラを作成する私たちの努力にもかかわらず、多くのユーザーが問題を報告しています。ASP.NETアプリケーションをインストールするための前提条件は何ですか?

Web配布プロジェクトを使用してコンパイル済み.netファイルを生成します。その後、出力をVS 2010展開プロジェクトで実行し、msiインストーラを生成します。

  • MSIインストーラはIIS7とうまく動作しないことが表示されます:ここで

    は、私たちが遭遇する問題だけのカップルです。 正しくインストールするには、IIS6の互換性が にインストールされている必要があります。それ以外の場合はエラーなしで失敗します。 「RemovePreviousVersionsを」がtrueに設定されている

  • にもかかわらず、インストーラはほとんどないproviousバージョンをアンインストールしていないし、ちょうどアプリケーションが既にインストールされているというエラーがスローされます。

我々は以前にInnoSetupインストーラを使用して試してみました。それはある程度は機能しましたが、誤ったアプリケーションプールに接続しているインストールされたアプリケーションに問題があり、InnoSetupスクリプトを使ってアプリケーションプールを定義する方法が見つかりませんでした。

は、誰かが私にあなたが不明な構成を持つWindows XP以降のマシン上のASP.NETアプリケーションの起動および実行を得るために必要なものの決定的なリストを与えることができますか?例えば.NET 2.0がインストールされている確認し、さらに良いなど

を、II6がインストールされているチェックのxにファイルをコピーし、仮想ディレクトリを作成し、誰もがあなたのためのセットアップのほとんどを行いインストーラ(またはInnoSetup拡張子)を知っていますか?

+2

幸運。 IIS、Webアプリケーション、SQL Server Expressをインストールするためのインストーラをビルドしようとしました。 1つの大きなインストーラで複数のインストーラをラップする必要がありました。その後、32ビット版と64ビット版の複数のインストーラを作成する必要がありました。その後、XPとWindows 7、など。それは十分な環境では決して働きませんでした。 :(最後に、OSのライセンスなどを使って製品と共に販売されたハードウェア構成のシステムイメージをあきらめて、それがまだ価値があったほど売れた。 –

+1

re:RemovePreviousVersions ... 異なるバージョンのファイルのみを置き換えるため、同じバージョンのアセンブリ(md5sum)を使用している場合は、同じファイルを別のアセンブリに置き換えてください(つまり、名前が暗示しているように、 'RemovePreviousVersions'プロパティが2008年以降に変更されました。 番号それを置き換えません。 このリンクをチェックしてください。http://stackoverflow.com/questions/4210294/visual-studio-2010-removepreviousversions MSIで短いスクリプトを実行して修正する必要があります。 – wal

答えて

0

すべてのオプションを検討した後、私はMSIインストーラを保つが、中に前提条件チェックを追加することにしましたイノセットアップスクリプト。

ここでスクリプト

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 [email protected] 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; 
0

要件のインストーラを開発するためにInstallshieldを使用することができます。 IISに応じて仮想ディレクトリの作成と削除、ターゲットシステムへのデータのコピー、OSの検証などをサポートするすべての機能があります。

0

外部の.dlls(アセンブリ)を使用している場合は、それらも展開する必要があります。たとえば、アプリケーションでCrystalレポート(CR)を使用する場合は、CRランタイムパッケージを本番マシンにインストールする必要があります。また、すべてのファイルがプロジェクトにインポートされていて、アプリケーションがローカルマシンのファイルを探していないことを確認してください(プロジェクトディレクトリ外)。

2

開発や運用サーバー上のリリースを展開するためには、次の手順に従ってください。

  1. Web配置MSIをインストールします。
  2. は右次にファイルをコンパイル
  3. (ここで私は、Webアプリケーションまたは公開に変換使用していない)ソリューションエクスプローラの下でプロジェクトをクリックして、Webデプロイメントプロジェクトを追加します。これにより、プロジェクトディレクトリに、サーバーにデプロイする必要なファイルが格納されたフォルダが作成されます。
  4. 仮想ディレクトリをバックアップし、仮想ディレクトリとinetpubからファイルを削除します。
  5. Inet mgrに移動し、実行ヒットenterにinetmgrと入力します。
  6. 既定のWebサイトで、仮想ディレクトリを作成し、展開されたファイルをinetpubに保存し、ファイルをブラウザーでブラウズします。
  7. 読み取り、実行スクリプト、参照などの適切なアクセスを許可します。あなたは私に知らせて、他のそれは便利持っている場合は、あなたの答えとして、すべての

旗それはだ ...

0

ウィンドウPIは、Windows XP SP3 +(以上)と連携し、ウェブdevのサーバー用prerequistesに入れています。

http://www.microsoft.com/web/downloads/platform.aspx

ハンズアップは、しかし - 私はそれを自分自身を試していないが、私はそれをdevのサーバーのために行くを与えると思います。あなたに興味があるかもしれない

関連する問題