Deploy Publish - potatoscript/asp.net.core.mvc GitHub Wiki

home

Deploy
HTTP Error 403.14 - Forbidden

Deploy

  1. Open the Project Property under Debug set the Environment Variables to Product -> ASPNETCORE_ENVIRONMENT Product

  2. Publish setting : Include Local database to your project Folder

    • tick the Databases and Entity Framework Migrations
  3. Install the .NET Core Hosting Bundle at

    https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer

  4. Install ASP.NET Core Runtime 3.1.7 if got version problem then use 1.1.13

  5. Share the permission of the folder in the server:

    Part A: Configuring your Application Pool Suppose the Application Pool is named 'MyPool' Go to 'Advanced Settings' of the Application Pool from the IIS Manager (1) Scroll down to 'Identity'. Trying to edit the value will bring up a dialog box. Select 'Built-In account' and under it, select 'ApplicationPoolIdentity'. (2) A few lines below 'Identity', you should find 'Load User Profile'. This value should be set to 'True'.

    Part B: Configuring your website (1) Website Name: SiteName (just an example) (2) Physical Path: C:\Whatever (just an example) (3) Connect as... : Application User (pass-through authentication) (The above settings can be found in 'Basic Settings' of the site in the IIS Manager) (4) After configuring the basic settings, look for the 'Authentication' - configuration under 'IIS' in the main console of the site. Open it. - You should see an option for 'Anonymous Authentication'. - Make sure it is enabled. Then right click and 'Edit...' it. - Select 'Application Pool Identity'.

    Part C: Configuring your folder The folder in question is C:\Whatever (1) Go to Properties - Sharing - Advanced Sharing - Permissions, and tick 'Share this folder' (2) In the same dialog box, you will find a button 'Permissions'. Click it. (3) A new dialog box will open. Click 'Add'. (4) A new dialog box 'Select Users or Groups' will open. - Under 'From this location' make sure the name is the same as your local host computer. - Then, under 'Enter the object names', type 'IIS AppPool\MyPool' and click 'Check Names' and then 'Ok' (5) Give full sharing permissions for 'MyPool' user. Apply it and close the folder properties (6) Open folder properties again. This time, go to Security - Advanced - Permission, and click Add. - There will be an option 'Select a Principal' at the top, or some other option to choose a user. Click it. (7) The 'Select Users or Groups' dialog box will open again. Repeat step 4. (8) Give all or as many permissions you need to the 'MyPool' user. - Check 'Replace all child object permissions..." and Apply and close. - You should now be able to use the browse the website

  6. Convert website folder to Application IIS Manager by right click on the folder in IIS Manager and select convert to application

  7. Install SqlLocalDb at https://microsoft-sql-server-express-localdb.software.informer.com/download/

  8. Change Identity in DefaultAppPool to LocalSystem (not recommended in the production)

home

HTTP-Error-403.14-Forbidden

  • move the uploaded folder to the wwwroot folder and rename it. Don't replace the file in the folder
  • Refresh the IIS Manager and convert the folder to Application use the DefaultAppPool