With VS2010, we introduced “web deployment tool” as the new publish method; at the same time, FTP publish is still available and supported in VS2010. In web application project system, because we centralized main deployment workflow, so some new features usually introducd at the same time with “web deployment tool” is also available to FTP publish. This includes a most important one “web.config transformation”. You can refer Vishal’s post for more detail of how to author transformation files. In this post I will use a simple case to just show how the transformation is wired even you still use publish methods like FTP or plain file system copy.
1. Create a new web application project
2. Expand the “web.config” node (If you create a Visual Basic project, enable “show all files” in the solution explorer), you will see two extra transformation files, “Web.Debug.Config” and “Web.Release.Config”. Note, if you would like to use your existing web application project, you can open it and right click the web.config node in the solution explorer and invoke the menu of “Add Config Transform”. That will create transformation files for each build configuration.)
3. As the “Web.Release.Config” template has the transformation action defined already to remove the “Debug” attribute for the compilation tag in the web.config file, let us switch the solution build configuration to “Release” (through menu of “Build”->”Configuration Manager…”) and use it.
4. Invoke the “Publish” to get the publish dialog opened. Create a profile and select method of “FTP” (you can use publish method of “File System” if you don’t have a FTP site to publish to, and want to try out with a disk path). Fill in the target location path, click “Publish” and wait for it is done. You can open destination site and check out the web.config, and you will see the “Debug” attribute is removed.
Hope it helps. Also as revealed in the project property tab of “Package/Publish”, there is a new setting of “Exclude Generated Debug Symbols” you can configure as well
Yugang Wang | Software Design Engineer | Visual Studio Web Developer
With VS2010, we introduced “web deployment tool” as the new publish method; at the same time, FTP publish
Are the transformation files excluded as well?
With FTP publish will VS2010 support any of the following encryption methods:
1. FTP/SSL
2. FTPS / Implicit SSL
3. HTTPS
4. SFTP / SSH
Hei,
This is very helpful tutorial. Will try to implement them.
Thanks,
Thani
My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. Greg Duncan has posted a few good links: Free Training of the Week – Seven hours of free, for a limited time, .Net (C#/VB) training
Hi TheLudditeDeveloper, unfortunately there are no current plans to support FTPS or SFTP with VS2010... Although the new MsDeploy 1-Click Publish does use Https behind the scenes and that will send your data securely over the wire... You can check out www.tinyurl.com/oneclickpublish to try out the feature...
Thanks - Vishal
Hi Mike, The transformation files are excluded by default without you needing to do anything special... Thanks
Vishal
Daily tech links for .net and related technologies - June 16-18, 2009 Web Development Revised: ASP.NET
Thank you for submitting this cool story - Trackback from DotNetShoutout
@TheLudditeDeveloper I second that. A lot of people still have to maintain sites on hosts that may not begin to offer the 1-click publish. FTP is what we've got, and I'd prefer to be able to work securely.
Sure Andrew thanks for the feedback we are trying to put the support for securing FTP transactions and will try our best to fit it in if possible...
Thanks