Welcome to MSDN Blogs Sign in | Join | Help

Visual Web Developer Team Blog

Your official information source from the Visual Web Developer team.

News

  • These postings are provided "AS IS" with no warranties, and confer no rights. Use of included code samples are subject to the terms specified Terms of Use
Updates to FTP publishing in Visual Studio 2010

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.)

image

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.

image

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.


image

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

image

Yugang Wang | Software Design Engineer | Visual Studio Web Developer

Posted: Tuesday, June 16, 2009 10:05 AM by WebDevTools

Comments

What's New said:

With VS2010, we introduced “web deployment tool” as the new publish method; at the same time, FTP publish

# June 16, 2009 5:53 PM

Mike said:

Are the transformation files excluded as well?

# June 16, 2009 6:30 PM

TheLudditeDeveloper said:

With FTP publish will VS2010 support any of the following encryption methods:

1. FTP/SSL

2. FTPS / Implicit SSL

3. HTTPS

4. SFTP / SSH

# June 16, 2009 7:28 PM

Thanigainathan said:

Hei,

This is very helpful tutorial. Will try to implement them.

Thanks,

Thani

# June 17, 2009 3:16 AM

Visual Studio Hacks said:

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

# June 17, 2009 12:06 PM

WebDevTools said:

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

# June 17, 2009 2:51 PM

WebDevTools said:

Hi Mike,  The transformation files are excluded by default without you needing to do anything special... Thanks

Vishal

# June 17, 2009 2:55 PM

Sanjeev Agarwal said:

Daily tech links for .net and related technologies - June 16-18, 2009 Web Development Revised: ASP.NET

# June 18, 2009 2:31 AM

DotNetShoutout said:

Thank you for submitting this cool story - Trackback from DotNetShoutout

# June 18, 2009 5:05 AM

Andrew Marx said:

@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.

# July 29, 2009 7:39 PM

WebDevTools said:

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

Vishal

# July 29, 2009 7:53 PM
New Comments to this post are disabled
Page view tracker