Click here to Skip to main content
15,848,349 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:
How to make setup exe of a website with Database?
[no name] 6-Sep-13 14:33pm
Sergey Alexandrovich Kryukov 6-Sep-13 14:34pm    
Why? This is not how ASP.NET applications normally deployed.

There is no concept of creating exe for a web application and website. You can publish application.The below link will help you publish or deploy the web application[^]
Hope this helps
Share this answer
ridoy 6-Sep-13 15:05pm    
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.
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.
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.)
Share this answer
Ron Beyer 6-Sep-13 15:05pm    
If you are going to copy/paste off of web pages, you should at least give the source.
ridoy 6-Sep-13 15:06pm    
Member 10257850 6-Sep-13 15:17pm    
Dholakiya Ankit 7-Sep-13 0:50am    
me toooooooo

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900