In the previous article we talked about the configuration of the server, now we say the configuration of the client.
0x01
To create a publishing profile using the Visual Studio Publishing Wizard
Then create a new profile, because our site may be published in many places, such as the release of an intranet test, publish a copy to the extranet deployment, so I usually use the IP address as the profile name
0x02
Next set up the connection, according to the server Configuration account settings
The destination URL is the address that is automatically opened by the browser when the publication is complete and does not invoke the browser without filling it out.
0x03
Then choose the compilation configuration to publish the program, the general local will choose debug convenient debugging, and the line will choose release
The database means that if your site is configured with a connection string through the connectionstrings section of Web. config, you can rewrite it here.
For example, if you use the local SQL Server that you tried with vs native tuning and then post it to the online server, you need to use this setting to update the connection string.
Another option, of course, is to replace the Web.debug.config or web.release.config file configuration transformation.
For more information about using the Web. config transformation, visit the http://go.microsoft.com/fwlink/?LinkId=125889
Note that one of the file publishing options is to delete other files on the target, which is equivalent to resetting the site's files.
Therefore, the use of the time need to pay attention, because sometimes the site will have users upload information files, etc., if the check this item, then the user's data will be deleted!
In addition, you can specify the precompilation options in the file publishing option, etc., where we use the default configuration. Have the interest to study it yourself.
0x04
Then the next step is to preview the changes, which is a bit like versioning, which is to commit only the changed files, such as the second recompile of the release just the file under the bin and the Web. config, because the other files are already the same.
This is the advantage of a Web deployment, but it is found in the use process that, if developer A is released after a collaborative development, if developer B re-releases is a full-volume update, then a re-release is a full-scale update. This may be the case that this tool is not designed to consider this multi-person collaboration release.
I generally do not go to the point of Preview Direct Point Publishing.
0x05
When these steps are complete, you only need to select the correct release profile in the first step and then click Publish to deploy the site to the corresponding server.
The compile and publish process information is displayed in the Output window of Visual Studio, and a Web Publishing Activity window provides an overview of the progress of the publication because it is a file upload, so it is generally slower to publish large files remotely.
One-click Deployment technology for ASP (bottom)