Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How to deploy asp.net core mvc & jQuery to IIS #5652


User avatar
0
lundracing created

I can not figure out how to deploy the application to IIS.

Is there a guide (not centered around Azure) that can point me in the right direction?

Project Type: Asp.NET Core MVC & jQuery Project Version: v5.6.2 (latest) Framework: .NET Framework 4.6.1

I have tried copying over the published contents to a root directory, creating an application in IIS, and when I navigate to the web address I get "xxx.foo.local’s server IP address could not be found."

Any help would be greatly apprciated. Thanks in advance


6 Answer(s)
  • User Avatar
    1
    statuscast created

    I just set up our project to use IIS. It was a bit of a process but it's working no problem.

    1. Create a new IIS Website. The directory to bind the site to is .\StatusCast.Web.Mvc I highly recommend binding the site to a specific domain name since Abp multi-tenancy leverages them a lot)
    2. Once created, a new local user will be created using the same name as the site, go in to SQL Server Manager > Security > Logins and add "IIS APPPOOL_websitename_" or whatever app pool name you used in IIS
    3. Ensure the new user has full access to the databases you created during installation.
    4. Load your local \windows\system32\drivers\etc\host file and ensure the domain name you bound your site to is pointing to 127.0.0.1
    5. In your Web.Mvc project properties, under Debug, create a new profile to access that website when launching using IIS instead of IIS Express.

    That should be it. To launch the Mvc project using IIS, within Visual studio change the Debug starting service from "IIS Express" to your new IIS profile.

    Hope that helps! jasen

  • User Avatar
    0
    ryancyq created
    Support Team

    Do take note that application pool for your website need to be configured as no managed code in IIS

  • User Avatar
    0
    lundracing created

    Thank you all for the reponses.

    I believe those instructions are intended for using IIS on your local machine. However, in my case I am deploying to WIndows Server 2016 with IIS.

    I have completed the following steps

    1. I have installed asp net core on the machine
    2. Created a new application pool with the .NET CLR version to No Managed Code
    3. I used visual studios publish to folder feature to create the project output
    4. I then created a new folder in the wwwroot and copied over the output of the vs publish into this folder (net461\net461\publish)
    5. Created a new website, using the binding xxx.foo.local:80
    6. Bound the website directory
    7. Selected the correct application pool
    8. Started the website

    And I still get nothing when I try to browse the application.

    Any other thoughts?

    Thanks!

  • User Avatar
    0
    ryancyq created
    Support Team

    get nothing isn' quite useful. ca you provide screenshot of the browser, network panel? at the same time, check the log file at App_Data\Log.txt

    Also, does the website loads if you change the website binding to localhost:80 instead of xxx.foo.local:80?

  • User Avatar
    0
    ismcagdas created
    Support Team

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

  • User Avatar
    0
    ismcagdas created
    Support Team

    A document is created https://github.com/aspnetzero/documents/blob/master/doc/Step-by-step-core-publish-to-iis.md