简体   繁体   中英

asp.net core publish issue

i am trying to run mvc on centos, here i got a problem. After publishing my app and go to the publish folder and input "dotnet core.dll", it works well and website can be accessible. then i close my terminal(Xshell5), my website can not be accessible, but the process dotnet is still running in the background. i tried another way with "dotnet run", then i close terminal , the website can still be accessible, can anyone tell me the reason, how can I use publish file running the website after i close my terminal ,thanks

编写一个名为web的脚本,内容:“ dotnet xxx.dll> / dev / null 2>&1&”保存,然后添加X特权“ sudo chmod + x web”,然后添加“ sudo ./web”,以便它可以在背景

转到项目文件夹并运行:

nohup dotnet run &

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM