locked
First project in an ASP.NET Core 3.1 application RRS feed

  • Question

  • User-2004582644 posted

    Hello,

    I have successfully completed my first project in an ASP.NET Core application using Connector/NET Core to explore the possibility to run this application on any .NET Core

    This is the tutorial

    This project work correctly on http://localhost:XXXX/Tablename

    Now I need publish the project on the windows server 2008 for sharing on the web this work

    On the server I have installed dotnet-sdk-3.1.300-win-x64.exe

    I have copied the folder and file from project local to remote server c:\inetpub\wwwroot\aspnetcore\mvccore

    but if get on the browser the link http://mywebsite/aspnetcore/mvccore/views/tablename/Index.cshtml the return is page not found

    isn't copying the local file and folders on the server enough for the project to work?

    I am server administrator... maybe do I have to configure IIS?

    can the new configuration create problems to the existing one on IIS?

    how to do resolve this?

    can you help me, please?

    Monday, June 1, 2020 4:25 PM

Answers

All replies

  • User-474980206 posted

    read the documentation:

      https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1

    you need to instal the aspnet core hosting module. then correctly configure IIS as per the documentation.

    Monday, June 1, 2020 8:17 PM
  • User-2004582644 posted

    Thanks

    I need publish this project on Windows Server 2008 R2 SP2

    According to this guide Host ASP.NET Core on Windows with IIS only Windows Server 2012 and later is supported for hosting .net core applications on IIS

    I have setting my project for run on dotnet-sdk-2.2.207-win-x64.exe for Windows Server 2008 R2 SP2

    And now?

    How to do for run on IIS 7?

    I have to install dotnet-sdk-2.2.207-win-x64.exe on the server or it is enough dotnet-sdk-3.1.300-win-x64.exe?

    Any suggestion, please?

    I don’t understand because not error when installing dotnet-sdk-3.1.300-win-x64.exe on Windows Server 2008 R2 SP2 … if only `Windows Server 2012` and later is supported for hosting `.net core` applications on `IIS`

    Monday, June 1, 2020 8:56 PM
  • User-474980206 posted

    windows 2008 does not support AspNetCore core module 2.0. you must use the asp core module for 2.1 and config as reverse proxy. create an asp.net core 2.1 project t get a sample web.config settings for the core module to use with your 3.1 project.

    on the windows server you will need to install asp.net 2.1 core runtime and asp.net core 3.1 runtime. you will need to install aspnet core module 1.0 (designed for 2.1).  

    you will need to create an unmanaged app pool, and assign to application in IIS. follow direction on this page:

       https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1#install-the-net-core-hosting-bundle

    note: I don't know if the core module v1 supports 3.1, you all need to try it. if not you will either

    1) fall back asp.net core 2.1 (the supported 2.0 version)
    2) manually configure IIS as a reverse proxy, and install your asp.net core 3.1 app as a service that IIS can reverse proxy to.

    Monday, June 1, 2020 9:34 PM
  • User-2004582644 posted

    thanks

    but manually configure IIS as a reverse proxy won't the other web applications developed in ASP NET C # work anymore?

    I have setting my project for run on .NET Core 2.2 Framework destination

    do I have to rewrite the project for .NET Core 2.2 or is that enough?

    Tuesday, June 2, 2020 6:48 AM
  • User-2004582644 posted

    I had IIS 7 installed on server.

    I installed .Net 4.8 and asp.net 2.1 core runtime and asp.net core 3.1 runtime on the server 2008 R2 SP2

    I copied the folder contiaining my published Web site to \inetpub\wwwroot on the server.

    With this post I configured MVC website in IIS.

    https://www.codeproject.com/Articles/1168712/How-to-Quickly-Configure-your-MVC-Website-in-IIS

    enter image description here

    But on the server the return is

    enter image description here

    What do I do to give the Web site a URL and otherwise make it active as a Web site?

    Maybe I have to install more on the server?

    enter image description here

    Moreover, the .cshtml pages don't work on the server 2008 R2...

    could you help me please?

    Tuesday, June 2, 2020 5:31 PM
  • User-474980206 posted

    what your did all not work. for IIS to host asp.net core, you need to install the AspNetCore hosting bundle from 2.1 download page:

       https://dotnet.microsoft.com/download/dotnet-core/2.1

    then follow the directions on this page:

      https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1#install-the-net-core-hosting-bundle

    the alternative to the hosting module is to reverse proxy from IIS. you install the IIS RR module . then you create a vdir and configure the vdir for reverse proxy to your standalone asp.net core app, which you installed as a service.

    if your asp.net core is the only website on the server, then it can use port 80  / 443 and IIS is not required.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 2, 2020 10:26 PM
  • User-2004582644 posted

    Really appreciated your help but I can't solve it

    Installed on the server

    With this post I configured MVC website in IIS.

    https://www.codeproject.com/Articles/1168712/How-to-Quickly-Configure-your-MVC-Website-in-IIS

    enter image description here

    return

    Wednesday, June 3, 2020 10:11 AM
  • User475983607 posted

    The site is not deployed correctly.  Use Visual Studio to publish the application to a folder on your development machine.  Copy the contents of the folder to the web server.

    https://docs.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-3.1&tabs=visual-studio

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 3, 2020 10:24 AM
  • User-2004582644 posted

    it finally worked thanks to everyone for the support and help

    Wednesday, June 3, 2020 12:19 PM