錯誤描述
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
錯誤現(xiàn)象:
無法訪問wwwroot
中的靜態(tài)資源
復(fù)現(xiàn)詳細錯誤:
[root@abcdefghijklmn ~]# dotnet /www/core/top.libeilin.orange.dll
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://[::]:80
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /root
解決方法
參考:asp.net core 2.1部署到Linux無法訪問wwwroot文件夾中的資源文章來源:http://www.zghlxwxcb.cn/news/detail-554691.html
說明:
啟動的時候沒在項目文件夾中啟動,我之前是在Linux主目錄啟動的項目。
進入項目目錄,再運行 項目名.dll
文件。文章來源地址http://www.zghlxwxcb.cn/news/detail-554691.html
[root@abcdefghijklmn ~]# cd /www/core/
[root@abcdefghijklmn core]# dotnet top.libeilin.orange.dll
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://[::]:80
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /www/core
到了這里,關(guān)于User profile is available. Using ‘/root/.aspnet/DataProtection-Keys‘ as key repository; keys will no的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!