Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create complete installer for ASP.Net web application

I'm programmed a web application on visual studio by ASP.Net C# and local database. then i want to create installer for this web application to do these actions on a target PC:

  1. Install requirements for database
  2. Install IIS on PC
  3. Publish my Web Application as an website on IIS

NOTE

Actually, this web application should be run on a LAN that consist 3 PC and one router. one of that PC's should be a server and the web application must be installed on that system, then the other PC's getting to use from web application on a LAN.

Update

I'm used from Advanced Installer and setup works fine. but when i start the website in client system, always get this error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.

and this is my connection string in web.config:

<add 
  name="SetupTestEntities" 
  connectionString="metadata=
  res://*/Model.csdl|
  res://*/Model.ssdl|
  res://*/Model.msl;
  provider=System.Data.SqlClient;
  provider connection string=&quot;
  data source=(LocalDB)\v11.0;
  attachdbfilename=|DataDirectory|\SetupTest.mdf;
  integrated security=True;
  connect timeout=30;
  MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
like image 381
Rasool Ghafari Avatar asked May 18 '14 10:05

Rasool Ghafari


1 Answers

You can use the Professional edition of Advanced Installer. This edition has support to install:

  • IIS web sites, app pools, web apps and virtual directories
  • install windows features without writing any scripting
  • install prerequisites, thus your requirements for your database

Advanced Installer also supports running SQL scripts, so you could create on the fly your databases and populate them with your defaults, but this feature is available in the Enterprise edition.

In the end Advanced Installer will build and MSI or EXE installer as output (depending on what you want), that you can use to deliver your application to any machine.

(disclaimer: I work on this product)

like image 196
Bogdan Mitrache Avatar answered Oct 12 '22 08:10

Bogdan Mitrache