views:

3300

answers:

4

I used to use discountasp.net and I can use Visual Studio 2008 to "publish" the website directly to the web host. I am using a dedicated server now (well, to be exact, Amazon EC2 Windows), how should I setup the web server so I can deploy the website directly from VS 2008? I tried to setup a FTP server but couldn't get it working.

Thanks!

A: 

Some basics first -

Have you verified that you can connect to the FTP account on the EC2 server using a standard FTP client?

What FTP server are you using on the server?

Did you check to see what connection types are supported on the FTP server, Active or Passive (or both). I think the publish web site wizard will use whatever connection type is specified in your IE browser FTP settings (Tools - Advanced - Use Passive FTP), the default is to use passive FTP.

Updated: Also see bold text in @Splattne's answer about opening ports 20/21 on the ec2 firewall.

HTH
Kev

Kev
+5  A: 

Here is a tutorial from the official Amazon EC2 deverloper site ("Deploy ASP.NET application to Amazon EC2 like a typical remote server. This tutorial shows you how")

If you need to deploy an ASP.NET application directly from Microsoft Visual Studio, you can use the Copy Web Site Wizard available in Microsoft Visual Studio 2005 and later.

The Copy Web Site Wizard allows you to deploy applications using File Transfer Protocol (FTP) or Microsoft Office FrontPage Server Extensions. To use FTP, you must install the FTP component of IIS as well as permit ports 20 and 21 through the firewall using the ec2-authorize command.

[...]

With Amazon EC2, you can deploy ASP.NET applications on dedicated Windows instances running in Amazon’s data centers. To deploy the application, you need to create an instance based on an AMI template. After creating the instance, you access the administrator password, then configure a firewall rule and Remote Desktop to the server. To provide persistent storage, you create an EBS volume, and then set up IIS and the ASP.NET application. You can deploy ASP.NET applications to the server with tools like Visual Studio or through FTP.

(from: Deploying ASP.NET Applications on Amazon EC2)

splattne
Why a downvote? i provided a link to the official EC2 tutorial...
splattne
Sorry that was me. Sticky fingers here didn't see the bit about 'ec2-authorize' for f/w config. I'd suggest making that part bold. Neg vote undone.
Kev
A: 

You can configure the FTP server in IIS to accept connections using your Windows account. Note that you'll have to point the "home" directory of the FTP account to your web directory or a parent thereof (if you use the parent, you'll configure the system to navigate on login to the web directory).

This isn't specific to IIS, you could also use the paid Server from IpSwitch or the free one from FileZilla.

If you cannot get FTP to work, it is probably a permissions issue. Note that an "old school" way of doing this is simply to publish to a local directory, zip the entire directory and then copy the zipped archive up to the server. It might help you over the hump until you get FTP working.

Mark Brittingham
Yeah...and if using IIS FTP, remember to disable anonymous access :)
Kev
A: 

Take a look at this article http://www.ec2studio.com/articles/Hosting.html. There is description with screenshots how you can host your ASP.NET application at EC2.