4

I've got an ASP.NET 5 project that I'd like to deploy to a remote server. I don't have remote desktop access to this machine, otherwise I could follow the same method most people use when deploying to IIS.

I'm able to deploy to my IIS 8.5 just fine on the same machine as my development. First I package my project to get the approot and wwwroot directories. Then, I point IIS to my wwwroot, and all works fine.

The problem is trying to deploy remotely. Normally I would zip up my MVC 5 project and use the IIS gui to 'import' an application.

enter image description here

That doesn't work for my MVC 6 project. Either I'm zipping it up incorrectly or MVC 6 projects can't be deployed this way.

How do you publish a vNext application to a remote IIS server?

Edit:

Just FYI, I am using Microsoft's Web Deploy Remote Agent to deploy this to the server. http://www.asp.net/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-(remote-agent)

It works perfectly for MVC 5 apps, because developers can easily deploy web apps and IT can restrict access to the machines, but the problem is trying to deploy MVC 6 apps using this agent.

I'm not questioning how to deploy MVC 6 projects to IIS, because that's already answered Here, this is concerning how to remotely deploy to IIS.

Community
  • 1
  • 1
Josh Schultz
  • 897
  • 1
  • 13
  • 32
  • Why doesn't it work? Are you getting an error? – mason Jul 22 '15 at 19:05
  • I'm getting a 403.14 when I try to go to my site. "403.14 - Directory listing denied." It's trying to just browse my directory rather than execute my site. I'm sure it's because my site is pointed at the folder containing both the wwwroot AND approot, when it should point directly at the wwwroot. – Josh Schultz Jul 22 '15 at 20:05
  • possible duplicate of [ASP.NET 5 project hosting on IIS](http://stackoverflow.com/questions/27325264/asp-net-5-project-hosting-on-iis) – mason Jul 22 '15 at 20:17
  • That link assumes you can drop the unzipped files on the file system of the hosted server. In my case, I don't have access to the remote server's file system. – Josh Schultz Jul 22 '15 at 20:23
  • 1
    You don't necessarily need access to the file system, as long as you got the folder on there somehow, which it sounds like you do. Instead configure IIS to point to the wwwroot directory, and make sure you configure your web.config file as described in the link I provided. If you don't have access to modify IIS settings, then request access or get someone who has access to do it for you. – mason Jul 22 '15 at 20:25

1 Answers1

5

I solved this by updating to Web Deploy 3.6. The newest version includes a specialized provider for deploying ASP.NET 5 applications.

Details on how to use it can be found with this blog post: http://azure.microsoft.com/blog/2014/08/11/web-deploy-3-6-beta-released/

The download link is as follows: http://www.microsoft.com/en-us/download/details.aspx?id=43717

Use the contentPathLib provider or enable contentlibextension.

Example usage:

C:\Program Files (x86)\IIS\Microsoft Web Deploy V3> msdeploy -verb:sync -source:iisapp=C:\release\Publish\wwwroot -dest:iisapp="Default Web Site/ExampleApp",computerName=machinename -enablelink:contentlibextension

To my knowledge, there isn't a GUI supporting these deployment methods yet. I assume this is because vNext is in Beta, and is expected to have breaking changes.

Josh Schultz
  • 897
  • 1
  • 13
  • 32