设置asp.net网站的exe [英] setup exe of a asp.net website

查看:88
本文介绍了设置asp.net网站的exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用数据库创建asp.net网站的设置exe?

How to make setup exe of a asp.net website with Database?

推荐答案

没有为Web应用程序和网站创建exe的概念。您可以发布asp.net应用程序。以下链接将帮助您发布或部署Asp.net Web应用程序

http://msdn.microsoft.com/en-us/library/1y1404zt(v = vs.80).aspx [ ^ ]

希望这有帮助
There is no concept of creating exe for a web application and website. You can publish asp.net application.The below link will help you publish or deploy the Asp.net web application
http://msdn.microsoft.com/en-us/library/1y1404zt(v=vs.80).aspx[^]
Hope this helps


检查:

创建c#Web应用程序设置,包括数据库.net框架 [ ^ ]

如何为。创建MSI安装程序包一个ASP.Net网站? [ ^ ]
Check:
Creating c# Web Application setup including database .net framework[^]
How to create an MSI installer package for an ASP.Net website?[^]


它们不是为Web应用程序创建安装文件的概念

他们有两种部署网站的方式

1) 发布

发布网站之前

检查原始网站的配置,并记下远程位置需要存在的任何设置。具体来说,请检查连接字符串,成员资格设置和其他安全设置等设置。

检查原始站点的配置,并记下发布的网站上需要更改的任何设置。例如,您可能希望在发布网站后禁用调试,跟踪和自定义错误。

因为继承了配置设置,您可能需要查看Machine.config文件或根目录SystemRoot \ Macrooft.NET \Framework\version \ CONFIG目录中的Web.config文件以及应用程序中的任何Web.config文件。如果您没有查看根配置文件的权限,则可以使用如何:查看继承和本地中的代码示例输出包含网站配置设置的完整列表的文件,格式为正确的配置文件。配置设置以编程方式。

有关配置设置的定义,请参阅常规配置设置(ASP.NET)和ASP.NET配置设置。

发布网站

在生成菜单上,单击发布网站。

在发布网站对话框中,单击省略号按钮(...)以浏览到要将其发布到的位置网站。

您可以将网站输出写入本地或共享文件夹,FTP站点或使用URL访问的网站。您必须在目标位置具有创建和写入权限。

为了能够在发布网站后更改.aspx文件的布局(而不是代码),请选择允许此预编译站点可更新复选框。

要使用密钥文件或密钥容器命名强命名的程序集,请选中在预编译的程序集上启用强命名复选框,然后单击确定。

发布状态显示在任务栏中。根据连接速度,站点大小和内容文件类型,发布时间可能会有所不同。发布完成后,将显示发布成功状态。

进行站点所需的任何配置更改。有关更多信息,请参见如何:配置已发布的网站。您可能还想加密特定的配置设置。有关详细信息,请参阅使用受保护配置加密配置信息。











2)主持:

-----------





在Visual Studio 2010中创建ASP.NET网站项目后,通常将项目部署到Web服务器,其他人可以访问您的应用程序。部署通常不仅仅涉及将应用程序的文件从一个服务器复制到另一个服务器。您可能还必须执行以下其他任务:

更改目标环境中必须不同的Web.config设置。

在数据库中传播数据或数据结构Web应用程序使用的。

在目标计算机上配置IIS设置,例如应用程序池,身份验证方法,是否允许目录浏览以及错误处理。

安装安全证书。

在目标计算机的注册表中设置值。

在目标计算机上的GAC中安装应用程序集。 (要在Web应用程序中共享的程序集,例如包含自定义ASP.NET服务器控件的程序集,应部署到远程服务器上的全局程序集缓存(GAC)。有关详细信息,请参阅全局程序集缓存。)

本主题介绍可用于执行部署Web站点项目的文件复制部分的工具,并说明如何使用它们。大多数其他任务必须手动完成。有关其他部署任务的信息,请参阅ASP.NET部署内容映射。

注意注意

本主题仅适用于网站项目。有关Web应用程序项目与Web站点项目之间差异的信息,请参阅Web应用程序项目与Web站点项目。

本主题包含以下部分。

用于部署Web的工具网站项目

复制网站工具

发布网站工具

选择部署工具

相关主题

用于部署网站项目的工具

对于涉及复制文件的网站项目部署,您可以使用Windows资源管理器,Windows xcopy命令等通用工具,或FTP工具。 Visual Studio提供以下专用工具,可帮助自动执行复制文件的过程,并可在部署过程中预编译网站项目:

复制网站工具有助于自动执行复制过程并在您打开的网站项目和另一个站点之间同步文件。

发布网站工具将一些源代码文件编译成程序集,然后将这些程序集和其他所需文件复制到您的文件夹中指定。然后,您可以使用您喜欢的任何方法将文件复制到其他服务器。

NoteNote

Visual Web Developer Express中不提供发布网站工具。 />
作为这些工具的替代方法,您可以通过将其作为Visual Studio FTP网站项目打开,直接在Web服务器上打开Web站点。在这种情况下,您可以直接在实际站点上处理文件。但是,使用FTP打开站点可能比使用脱机文件更慢。此外,当您更新站点中的实时文件时,它们会在您有机会测试它们之前立即生效,并且您可能会引入用户可以看到的错误。

没有选项可以复制Machine.config文件或根Web.config文件。这些文件中的某些设置由您的网站继承。因此,站点在目标Web服务器上运行时的配置可能与计算机上的配置不同。这可能会影响应用程序的行为。

复制网站工具

复制网站工具使您可以在目标站点上打开文件夹(可以打开远程计算机或同一计算机上的其他文件夹),然后在源Web站点和目标Web站点之间复制文件。该工具支持以下功能:

您可以将源文件(包括.aspx文件和类文件)复制到目标站点。在目标服务器上请求Web页面时动态编译它们。

您可以使用Visual Studio支持的任何连接协议来复制文件。这包括本地Internet信息服务(IIS),远程IIS和FTP。如果使用HTTP协议,则目标服务器必须具有FrontPage Server Extensions。

同步功能检查源网站和目标网站中的文件,通知您每个站点中哪些文件更新,以及使您能够选择要复制的文件以及复制它们的方向。

复制应用程序文件之前,复制网站工具会将名为App_offline.htm的文件放入目标网站的根目录。当App_offline.htm文件存在时,对网站的任何请求都将重定向到此文件。该文件显示一条友好消息,告知客户端网站正在更新。复制完所有网站文件后,复制网站工具将从目标网站删除App_offline.htm文件。

发布网站工具

发布网站站点工具预编译Web站点的内容,然后将输出复制到您指定的目录或服务器位置。您可以将输出写入本地或内部网络文件系统中可用的任何文件夹,方法是使用文件传输协议(FTP)或使用HTTP。您必须具有适当的权限才能写入目标站点。

您可以作为发布过程的一部分直接发布到Web服务器,也可以预编译到本地文件夹然后复制文件到Web服务器。

有关预编译的更多信息,请参阅ASP.NET预编译概述。

选择部署工具

无论你是否选择复制网站工具或发布网站工具取决于您打算如何使用和维护您的网站。

在以下情况下使用复制网站工具:

您经常更改站点,并且您不希望每次进行更改时都必须手动编译站点。

您想使用该工具的同步功能,并且您希望部署使用FTP或HTTP将站点发送到远程Web服务器。 (发布网站工具只能复制到本地计算机或本地网络上的另一台计算机。

您无需预编译网站。

使用发布在以下情况下的网站工具:

您想要预编译网站,以避免在Web服务器上放置源代码或标记。这有助于保护您的知识产权。

您希望进行预编译,以避免在第一次从Web服务器请求页面时由动态编译引起的延迟。(在决定预编译站点是否值得之前,您应该测试站点以确定此延迟是否有意义这个原因。)
Their is no concept to create setup file for web application
Their is a two ways to Deploy a web site
1) Publish:
Before publishing a Web site
Check the configuration of your original site and make note of any settings that need to exist at the remote location. Specifically, check settings such as connection strings, membership settings, and other security settings.
Check the configuration of your original site and make note of any settings that need to be changed on the published Web site. For example, you might want to disable debugging, tracing, and custom errors after you publish your Web site.
Because configuration settings are inherited, you might need to look at the Machine.config file or the root Web.config file in the SystemRoot\Microsoft.NET\Framework\version\CONFIG directory as well as any Web.config files in your application. If you do not have permission to view the root configuration files, you can output a file that contains a complete list of configuration settings for your Web site, formatted as a proper configuration file, using the code example in How to: View Inherited and Local Configuration Settings Programmatically.
For definitions of configuration settings, see General Configuration Settings (ASP.NET) and ASP.NET Configuration Settings.
To publish a Web site
On the Build menu, click Publish Web Site.
In the Publish Web Site dialog box, click the ellipsis button (…) to browse to the location to which you want to publish the Web site.
You can write the Web site output to a local or shared folder, to an FTP site, or to a Web site that you access with a URL. You must have Create and Write permissions in the target location.
To be able to change the layout (but not the code) of .aspx files after publishing the Web site, select the Allow this precompiled site to be updateable check box.
To name strongly named assemblies using a key file or a key container, select the Enable strong naming on precompiled assemblies check box, and then click OK.
Publishing status is displayed in the taskbar. Depending on the connection speed, the size of the site and the types of content files, publishing time can vary. When publishing is completed, the status of Publish succeeded is displayed.
Make any configuration changes that are necessary for your site. For more information, see How to: Configure Published Web Sites. You might also want to encrypt specific configuration settings. For more information, see Encrypting Configuration Information Using Protected Configuration.





2) Hosting:
-----------


After you have created an ASP.NET Web site project in Visual Studio 2010, you typically deploy the project to a Web server where others can access your application. Deployment typically involves more than just copying the application's files from one server to another. You might also have to perform additional tasks such as the following:
Changing Web.config settings that must be different in the destination environment.
Propagating data or data structures in databases that are used by the Web application.
Configuring IIS settings on the target computer, such as the application pool, the authentication method, whether directory browsing is allowed, and error handling.
Installing security certificates.
Setting values in the registry of the target computer.
Installing application assemblies in the GAC on the target computer. (Assemblies that you want to share across Web applications, such as assemblies that contain custom ASP.NET server controls, should be deployed to the global assembly cache (GAC) on a remote server. For more information, see Global Assembly Cache.)
This topic describes the tools that are available to perform the file-copying part of deploying Web site projects and explains how to use them. Most of the other tasks must be done manually. For information about other deployment tasks, see ASP.NET Deployment Content Map.
NoteNote
This topic applies only to Web site projects. For information about the difference between Web application projects and Web site projects, see Web Application Projects versus Web Site Projects.
This topic contains the following sections.
Tools for Deploying Web Site Projects
The Copy Web Site Tool
The Publish Web Site Tool
Choosing a Deployment Tool
Related Topics
Tools for Deploying Web Site Projects
For the part of Web site project deployment that involves copying files, you can use general purpose tools such as Windows Explorer, the Windows xcopy command, or an FTP tool. Visual Studio provides the following specialized tools that help to automate the process of copying files and can precompile a Web site project as part of the deployment process:
The Copy Web Site tool helps to automate the process of copying and synchronizing files between the Web site project that you have open and another site.
The Publish Web Site tool compiles some source code files into assemblies and then copies those assemblies and other required files to a folder that you specify. You can then use whatever method you prefer to copy the files to a different server.
NoteNote
The Publish Web Site tool is not available in Visual Web Developer Express.
As an alternative to these tools, you can open a Web site directly on the Web server by opening it as a Visual Studio FTP Web site project. In that case, you can work with files directly on the live site. However, opening a site by using FTP can be slower than working with files offline. In addition, when you update live files in a site, they are live immediately before you have a chance to test them, and you might introduce errors that your users can see.
None of the options copy the Machine.config file or the root Web.config file. Some of the settings in these files are inherited by your Web site. Therefore, the configuration of your site when it runs on the target Web server might differ from its configuration on your computer. This might affect the behavior of the application.
The Copy Web Site Tool
The Copy Web Site tool enables you to open a folder on a target site (which can be on a remote computer or just a different folder on the same computer), and then copy files between the source Web site and the target Web site. The tool supports the following features:
You can copy source files, including.aspx files and class files, to the target site. The Web pages are compiled dynamically when they are requested on the target server.
You can copy files by using any connection protocol that is supported by Visual Studio. This includes local Internet Information Services (IIS), Remote IIS, and FTP. If you use HTTP protocol, the target server must have FrontPage Server Extensions.
The synchronization feature examines the files in the source and target Web sites, informs you about which files are more current in each site, and enables you choose which files you want to copy and the direction in which you want to copy them.
Before you copy application files, the Copy Web Site tool puts a file that is named App_offline.htm into the root directory of the target Web site. While the App_offline.htm file exists, any requests to the Web site are redirected to this file. The file displays a friendly message that tells clients that the Web site is being updated. When all Web site files have been copied, the Copy Web Site tool deletes the App_offline.htm file from the target Web site.
The Publish Web Site Tool
The Publish Web Site tool precompiles the content of the Web site and then copies the output to a directory or server location that you specify. You can write the output to any folder that is available to you in the local or internal network file system, by using File Transfer Protocol (FTP), or by using HTTP. You must have appropriate permissions to be able to write to the target site.
You can publish directly to a Web server as part of the publish process, or you can precompile to a local folder and then copy the files to a Web server yourself.
For more information about precompilation, see ASP.NET Precompilation Overview.
Choosing a Deployment Tool
Whether you select the Copy Web Site tool or the Publish Web Site tool depends on how you intend to use and maintain your site.
Use the Copy Web Site tool in the following situations:
You make frequent changes to the site and you don't want to have to manually compile the site every time you make a change.
You want to use the tool's synchronization feature and you want to deploy the site to a remote Web server by using FTP or HTTP. (The Publish Web Site tool can copy only to the local computer or to another computer on the local network.
You do not need to precompile the site.
Use the Publish Web Site tool in the following situations:
You want to precompile the site in order to avoid putting source code or markup on the Web server. This helps to protect your intellectual property.
You want to precompile in order to avoid the delay caused by dynamic compilation the first time a page is requested from the Web server. (You should test the site to determine if this delay is significant before deciding that precompiling the site is worthwhile for this reason.)


这篇关于设置asp.net网站的exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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