Open 4m-world opened 4 years ago
Can you comment on each task and the reason for it? I only understand the last point.
Add a
web.config
to the project if it does not exist in the project Form some reason theweb.config
was not generated in the publishing process, which was resolved after updating VS to the latest version.Set hosting model to
outofprocess
The Shared webhost that I'm using has some restrictions with .net core, where OrchardCore did not run using inprocess
configuration
turn on the stdoutlog and make sure that to point to accessible/writable path
Some errors that occur during application startup prevent the framework from working. In such cases, enabling the ASP.NET Core stdout log usually helps to diagnose the issue. Which lead me to the previous decision.
change the process form targeting the out
.exe' file to target
dotnetand pass the
.dll` of your web app as an argument<aspNetCore processPath="dotnet" arguments=".\CodeMatrix.Oktobly.Web.dll" stdoutLogEnabled="true" stdoutLogFile="..\logs\stdout" hostingModel="outofprocess" />
Frankly, I didn't dig in this point as its the default template with outofprocess
, and when I changed the option with the exe file to out of the process the app did not run.
- since you are on a shared host you will have a warning message about data protection, says it uses memory repository to overwrite it in the application startup make change data protection to a file-based and make sure that the directory has read and write access for the process. More details on data protection can be found here
The default data protection settings are in memory with a shared host we have limitations hence the most appropriate option is to use File System
- The last thing makes sure that
App_Data
folder have proper permission (write/ready).
Some lessons learned from deploying an OC project to a shared host that would be great to be included in the deployment docs.
Add a
web.config
to the project if it does not exist in the projectSet hosting model to
outofprocess
turn on the stdoutlog and make sure that to point to accessible/writable path
change the process form targeting the out
.exe' file to target
dotnetand pass the
.dll` of your web app as an argumentsince you are on a shared host you will have a warning message about data protection, says it uses memory repository to overwrite it in the application startup make change data protection to a file-based and make sure that the directory has read and write access for the process. More details on data protection can be found here
The last thing make sure that
App_Data
folder have proper permission (write/ready).