How to Use Web Deploy to deploy your website

This blog post will detail how to use Visual Studio 2010 to deploy your website or ASP.NET application to your Arvixe hosted site. Web Deploy allows you to publish your site quickly and easily without having to login to the control panel or FTP. For those not familiar with Web Deploy you can read more about it here:  http://learn.iis.net/page.aspx/426/overview-of-web-deploy/

Arvixe offers Web Deploy service with all ASP/ASP.NET hosting packages.

Requirements:

i) You need to have Remote IIS Management enabled. You can enable it from the “Management” tab in your website properties in your Arvixe control panel. Inquire our staff if you run into any problems. The username and password you choose in that tab will be the username and password you use for Web Deploy.

ii)You need to have Visual Studio 2010 and the web deploy plugin ( x86 version – http://go.microsoft.com/fwlink/?LinkId=109365 x64 version – http://go.microsoft.com/fwlink/?LinkId=109366 )

If you are a new customer: Web Deploy is automatically setup for you along with Remote IIS when your account is created. To enable it login to your control panel and go to Websites > Click on your website > Click on the Management tab > Enter a username and password > Click Enable. From that point you can follow this blog tutorial on how to use web deploy.

If you are an existing customer: Web Deploy is setup on a per user/site request. Please submit a ticket to have Web Deploy enabled for your account. If you require it on more then one website, please list them in the ticket.

1. Start Visual Studio 2010 and select your project. In this case, we’re using an ASP.NET 4.0 web application.

2. Navigate to the option “Publish Web Application”

3. Leave Web Deploy selected and fill in the relevant information.

Note: The “allow untrusted certificate” option must be checked. Also, make sure you do not check the “Mark as IIS Application on Destination” option if you are deploying to the root as the root is already marked as an IIS application. Even when uploading to a subdirectory that’s already been made a virtual directory inside the control panel, leave this option unchecked.

4. Once you have the settings filled in click the “Publish” button. The log on the bottom of the screen will display all of the information pertaining to the upload (and whether it succeeds or fails). You should see the following when it’s finished deploying your content:

Now, you should be able to navigate to the URL and view the content you deployed.

Tags: , , , , , | Posted under Web Deploy | RSS 2.0

14 Comments on How to Use Web Deploy to deploy your website

  1. Bryce Abbott Bryce says:

    More detail

    On the Publish Web Profile dialogue
    Publish Method: Web Deploy
    Service URL: HAZEL.arvixe.com (or your appropriate Arvixe server)
    Site/application: MyWebSite.com
    Mark as IIS application: Unticked
    Leave extra files on dest: Ticked
    Allow untrusted cert. Ticked
    User name: MyWebSite.com_admin (see below)
    Password:

    To get your User name and password, go to the Control Panel, Management tab in Web Site Properties
    There you will see the username, and can set your password.

    IMPORTANT! As is, this will overwrite your production web.config with your debelopment seb.config, make sure you have a backup of it before you play.
    If you want to configure so you keep it, do 2 things:
    1. Leave extra files on dest: Ticked (see above)
    2. Look in directory C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications
    Find the file Microsoft.WebApplication.targets
    Edit it (admin rights needed, and of course copy a backup)
    Find the line

    After this line add these lines:

    Project

    Works for me
    Bryce

  2. Alex B says:

    is there another setting I need to adjust? After I click “Publish” I see this error:

    Error 1 Web deployment task failed.((2/5/2011 3:21:49 PM) An error occurred when the request was processed on the remote computer.)

    (2/5/2011 3:21:49 PM) An error occurred when the request was processed on the remote computer.
    The application pool that you are trying to use has the ‘managedRuntimeVersion’ property set to ‘v2.0′. This application requires ‘v4.0′.

  3. Alex B says:

    solution: next to the “Management” tab is the “Extensions” tab, set “Asp.Net” to 4.0

    :-)

  4. Thank you for your wonderful submit. Really informative and I enjoyed reading it along with your other articles. Thanks for sharing and continue the good work.

  5. Hello! Just dropped by to say great web site. Continue with the good job you’re doing!

  6. Subhendu says:

    Thanks for the steps! Had no clue how to publish to a web hosting site.

  7. joe says:

    How do you deploy an ASP.net website as an application in a subfolder if you have to de-select ‘mark as an iis application on destination?’ I”m trying to deploy separate asp.net applications to subfolders (eg. where ~/ resolves to the web application in its own subfolder). In IIS7 manager you just ‘add an application’ (as opposed to a virtual directory). That doesn’t seem possible with websitepanel. Has anyone been able to do this? To further illustrate what I am talking about you can see a post about it here: http://stackoverflow.com/questions/1516041/run-an-asp-net-website-in-a-subfolder

  8. John says:

    For me, this blog written by Ronald Craft and the first comment written by Bryce mislead me. It took me nearly three days to finally get my site: http://www.menucool.com working. I hope it will help if your case is similar to mine.
    My first website, http://www.menubasic.com, works when I took the first comment approach written by Bryce. But my second website, http://www.menucool.com, doesn’t work with the approach even if I configure it exactly like my first site. Then Arvixe support gave this blog to me, but it doesn’t work. Finally I found the screenshot of Step 3 is misleading. It should be:
    1. The Service URL should be: hazel.arvixe.com
    2. The Site/application should be: menucool.com (my site)
    3. The user name should be menucool.com_pub (neither menucool.com_admin nor menucool.com)

    Another thing to check: make sure your domain has DNS enabled (In domain’s management section).

  9. Ian McIntosh Ian McIntosh says:

    John: there have been some changes in control panel recently, one of which is that the web deploy username defaults to a name suffixed _pub (whereas until recently the default was _admin), also there is currently no option to change that username. Bryce’s comment is still correct, though, as it tells you how to find the username by going to the Management tab.

  10. Levent Aktas says:

    Thank you for the tutorial. I have a question though. Can we publish local databases that we use in the asp application to the server using web deploy. I saw an option in vS 2010 along those lines. If yes, what settings should be used?
    Thank you.

  11. lt980 says:

    Thank you so much for your articles, I will share your link in my facebook.

  12. e-commerce says:

    My brother suggested I might like this website. He was totally right. This post actually made my day. You cann’t consider simply how so much time I had spent for this info! Thank you!

  13. Two weeks ago I was able to deploy from Visual Studio just fine, using the information in this post. Now however, I just get this error. Nothing has changed, as far as I know.

    Error : Web deployment task failed.((1/12/2012 3:11:30 PM) An error occurred when the request was processed on the remote computer.)

    (1/12/2012 3:11:30 PM) An error occurred when the request was processed on the remote computer.
    The server experienced an issue processing the request. Contact the server administrator for more information.
    Publish failed to deploy.

    As I said, it was working fine just a couple of weeks ago (prior to the addition of the Publishing tab in the control panel). Any ideas?

    Thanks,
    Mike

  14. I was getting the following error…

    Error 9 Web deployment task failed. ((1/22/2012 2:28:57 PM) An error occurred when the request was processed on the remote computer.)
    (1/22/2012 2:28:57 PM) An error occurred when the request was processed on the remote computer.
    Attempt to perform an unauthorized operation on file ’4_0_30319′.

    It turns out that recently Arvixe added a new tab under the website in the control panel called Publishing. On that tab I didn’t have Web Deploy Publishing enabled. I added a password and enabled Web Deploy and I was still having issues. Finally, I was able to put several things together and found that the box “Leave extra files on destination (do not delete)” had to be checked to make it work.

Leave a Reply

Your email address will not be published. Required fields are marked *


6 + 4 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>