Deploying Asp.Net Core Web Application on IIS

Joe Green 146 Reputation points
2021-10-14T14:26:24.763+00:00

I'm trying to deploy my first ever asp.net core MVC web application to production server. It will be hosted on IIS. I published the application to a folder. My publish settings are as follows:
Configuration: Release
Target Framework: net5.0
Deployment Mode: Framework-dependent
Target Runtime: Portable
EF Migrations: Apply the migration on publish is checked.

Visual Studio published application to folder without any errors. I copied it server. I can view the homepage of the application from browser.

I've two questions:

  • I see folders for different languages that contain dll. Since this application is only in English language, do I need to copy all these folders for different languages to server?
  • I was hoping the EF Core will create table on production server but it didn't. I see a folder called EFSQLScripts which contains a SQL script. How do I run this SQL script and where (on development machine or production server)?

Joe

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,203 questions
0 comments No comments
{count} votes

Accepted answer
  1. AgaveJoe 26,141 Reputation points
    2021-10-14T14:46:14.413+00:00

    I see folders for different languages that contain dll. Since this application is only in English language, do I need to copy all these folders for different languages to server?

    The following SO post explains how to configure the web application to exclude localized assemblies.

    .net core build produces localization folders
    Resources in .NET apps

    I was hoping the EF Core will create table on production server but it didn't. I see a folder called EFSQLScripts which contains a SQL script. How do I run this SQL script and where (on development machine or production server)?

    Hoping is not a good approach. It sounds like you want to run pending migrations when that application starts?

    ASP.NET Core - Automatic EF Core Migrations to SQL Database on Startup
    Applying Migrations

    0 comments No comments

0 additional answers

Sort by: Most helpful