1

How can we publish Asp.net vnext application , I have tried to deploy with File System,

1) Why in published file system approot has all source code

2) I have FTP files in wwwwroot into IIS website folder but still not working

Do I need to install anything on IIS7., Windows Server 2012

Warren P
  • 65,725
  • 40
  • 181
  • 316
ineffable p
  • 1,207
  • 2
  • 22
  • 46

2 Answers2

1

First, ASP.NET vNext is nowhere near primetime. You should absolutely not be using it for any production code. As to your questions:

  1. Why in published file system approot has all source code

    One of the main selling points of vNext is the compile in memory features of Rosalyn. All the source code is published, because there is no pre-compilation any more. It's more like scripting languages like PHP, Ruby, etc. now, where you can make a change to the source and instantly see the changes.

  2. I have FTP files in wwwwroot into IIS website folder but still not working

    Because this is all still very much preview, IIS 8 (which is what's running in Windows Server 2012, not IIS 7), cannot support the site as it would normally be published. You have to use the command-line tool kpm to pack the application, which essentially builds it like an old-school MVC application. See the first section of https://github.com/aspnet/Home/wiki/FTP-deploy-an-AspNet-vNext-application-to-Microsoft-Azure-websites.

Chris Pratt
  • 232,153
  • 36
  • 385
  • 444
  • @WarrenP: Such is the fate of a programming-related Q&A site. The question is directly asking about an early build of vNext (now ASP.NET 5 + MVC 6). The answer goes with the question. If someone needs help with deploying the current release, they can ask a new question (and probably have). It's not necessary, nor expected, to forever keep answers updated with all the latest and greatest. For someone like myself with 1000s of answers, spanning 5 years of time, that's simply untenable. – Chris Pratt Jan 06 '16 at 19:39
  • I have asked a new question, and if nobody can provide enough information in one source, I'll figure it out and answer it myself, here:http://stackoverflow.com/questions/34641065/how-can-i-publish-from-visual-studio-2015-u1-asp-net-5-to-iis-on-windows-serv – Warren P Jan 06 '16 at 20:07
-1

I got my app to deploy to Windows Server 2012 R2 by:

  1. Bundled my MVC app with:

    kpm bundle --configuration Release --runtime kre-clr-win-x64.1.0.0-beta3 -o < directory on your 2012 server >

This will copy all the necessary folders and files to the server (It needs more than just the wwwroot folder to work)

  1. Created a new a application in IIS and point the physical path to the wwwroot folder

That's it!

BTW, I have not been able to get the publishing to work from VS2015. I've been using the command line for all this.

CybrGaunt
  • 139
  • 1
  • 4