如何创建ASP.Net Web应用程序安装完成 [英] How to create complete installer for ASP.Net web application

查看:321
本文介绍了如何创建ASP.Net Web应用程序安装完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被ASP.Net C#和本地数据库编程的Visual Studio的Web应用程序。然后我希望此Web应用程序做一个目标电脑上这些行动创建安装程序:


  1. 安装数据库的要求

  2. 在PC上安装IIS

  3. 发布我的Web应用程序的IIS上的网站

注意

其实,这个Web应用程序应当局域网是由3个人电脑和一台路由器上运行。该PC的应该是一个服务器和Web应用程序之一,必须在该系统上安装,那么其他电脑获得从LAN上的web应用程序中使用。

更新

我是从高级安装使用和设置工作正常。但是当我开始在客户端系统的网站,总是得到这个错误:

建立SQL Server的连接时发生网络相关的或特定于实例的错误。服务器未找到或无法访问。验证实例名称是否正确,以及SQL Server配置为允许远程连接。 (提供者:SQL网络接口,错误:50 - 发生本地数据库运行时错误无法创建一个自动实例请参阅Windows应用程序事件日志错误的详细信息

这是在web.config中我的连接字符串:

 <添加
  NAME =SetupTestEntities
  的connectionString =元数据=
  RES://*/Model.csdl |
  RES://*/Model.ssd​​l |
  RES://*/Model.msl;
  供应商= System.Data.SqlClient的;
  提供连接字符串=安培; QUOT;
  数据源=(的LocalDB)\\ V11.0;
  attachdbfilename = | DataDirectory目录| \\ SetupTest.mdf;
  集成安全=真;
  连接超时= 30;
  MultipleActiveResultSets = TRUE;应用=&的EntityFramework放大器; QUOT;的providerName =System.Data.EntityClient/>


解决方案

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

高级安装程序还支持运行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)

这篇关于如何创建ASP.Net Web应用程序安装完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆