How To: Use 'Publish Web Site' tool when deploying a Web map application with Visual Studio
Instructions provided describe the procedure for using the Visual Studio 'Publish Web Site' tool when finalizing a Web map application with ArcGIS Server. The 'Publish Web Site' tool migrates files to the server, automatically reducing errors associated with FTPing and transferring files manually.
Not all files will be moved to the target location when using the 'Publish Web Site' tool. The tool only sends the needed precompiled .NET code and the required Web files. The target location is a directory or folder within the Web server.
All data in the target folder and its subfolders will be deleted and replaced with the project files being migrated to the server.
Special steps need to be considered when deploying projects containing data in the App_Data folder, such as projects with a SQLEXPRESS database. This includes map applications that incorporate form authentication security created using the Web Site Administration Tool. These steps are not a part of this article.
- Right-click on the Solution Explorer in project Visual Studio.
- Select 'Publish Web Site'.
- Add a target location to the Target Location field. Using a FTP method will result in a user name/password prompt when Visual Studio attempts to publish the site. See examples of target locations.
It is good to examine the target location first. If a directory is chosen that contains lots of files and folders, only the files and folders that are the same will be replaced and the rest will be deleted.
- Click OK.
- Review the Visual Studio output panel for successful transfer results.
- Next, check the target location verifying all files were transferred.
Lastly, if the Web project contained a default.aspx page, open the Web browser and navigate to the Web map application URL. If the target location was C:\Inetpub\wwwroot\myproject, the corresponding URL would be http://myproject. If the target FTP location was ftp://yourGISsite.com, the corresponding URL would be http://yourGISsite.com.