I developed an MVC web site using .NET Core RC2 in VS Code on my Mac and I tried to deploy it in Windows Server 2012 R2 IIS. I used https://docs.asp.net/en/latest/publishing/iis.html as reference. My project.json has Microsoft.AspNetCore.Server.IISIntegration
, and Microsoft.AspNetCore.Server.Kestrel
. My startup.cs has app.UseStaticFiles
, app.UseSession
and app.UseMVC
.
I did
No Managed Code
as .NET CLR versionAnd I get the following error
502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
What do I do wrong?
Following cesarbs hint I have made a dotnet publish
, copied the generated folder to the website root and I recycled the application pool. It worked beautifully.