且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何创建ASP.Net Web应用程序安装完成

更新时间:2022-11-06 13:46:11

您可以使用高级安装的专业版一>。此版本已经支持安装:

高级安装程序还支持运行SQL脚本,所以你可以动态创建数据库,并与您的默认值进行填充,但是这个功能在企业版是可用的。

在年底高级安装将建立和MSI或EXE安装程序作为输出(取决于你想要什么),你可以用它来实现您的应用程序在任何机器。

(声明:我对这款产品的工作)

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" />

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

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)