Reputation: 6053
We have an ASP.NET 2.0 application that is available as a trial download. As such, we have no control over the environment into which it will be installed. Despite all our efforts to produce a reliable installer, we still get a lot of users reporting problems.
We generate compiled .net files using a web deploy project. We then take the output and run it through a VS 2010 Deployment Project to generate an msi installer.
Here are just a couple of the issues we encounter:
We have previously tried using an InnoSetup installer. It worked to a certain extent, but we had problems with the installed application connecting to the wrong app pool and never found a way to define the app pool via the InnoSetup script.
Can somebody give me a definitive list of what you need to get an ASP.NET application up and running on a Windows XP or later machine that has an unknown configuration? e.g. check .NET 2.0 is installed, check II6 is installed, copy files to x, create virtual directory etc.
Even better, does anybody know of an installer (or InnoSetup extension) that does most of the setup for you?
Upvotes: 7
Views: 2032
Reputation: 6277
Window PI works with Windows XP SP3+ (and greater) and put on the prerequistes for a web dev server.
http://www.microsoft.com/web/downloads/platform.aspx
Hands up though - I haven't tried it myself but I'd give it a go for a dev server. Might be of interest to you
Upvotes: 0
Reputation: 6053
After reviewing all the options I decided to keep the msi installer, but add the prerequisite checks in the inno setup script.
Here's the script
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;
Upvotes: 0
Reputation: 839
In order to deploy the release on the development or production server, please follow the following steps.
Flag it as your answer if you have find it useful else let me know ...
Upvotes: 2
Reputation: 73
If your using external .dlls(assemblies) then you must deploy them too. For example : If an application uses Crystal reports(CR) then CR run-time package must be installed on the production machine. Also make sure that all your files are been imported to your project and your application does not look for its files in your local machine(out side your project directory).
Upvotes: 0
Reputation: 31
You can use Installshield to develop the installer for your requirements. It has all the fetures which support creating and removing virtual directories depending on IIS, copying data on target system, Validating the OS etc.
Upvotes: 0