与.net framework 系列的iis 部署不同

部署netcore 还需要根据相应版本下载 环境和 hosting之类,有空补充,今天着重说说日志这块,没有日志这块出现部署问题,还是自己程序上传问题,

那真是睁眼瞎

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure         比如这个错误, 很多人说是版本不对,我很确信程序内netcore版本和环境安装的版本是对应的

设置日志

 

 

 

然后打开事件查看器

 

 应用程序查看

 

日志名称:          Application
来源:            IIS AspNetCore Module V2
日期:            2021/1/6 8:40:11
事件 ID:         1020
任务类别:          无
级别:            错误
关键字:           经典
用户:            暂缺
计算机:           server
描述:
Application '/LM/W3SVC/2/ROOT' with physical root 'C:\wwwroot\' failed to start process with commandline
 'dotnet .\Senparc.Weixin.Sample.NetCore3.dll' with multiple retries. Failed to bind to port '12638'. 
 First 30KB characters of captured stdout and stderr logs from multiple retries:
Error:
  An assembly specified in the application dependencies manifest (Senparc.Weixin.Sample.NetCore3.deps.json) was not found:
    package: 'Microsoft.VisualStudio.Web.CodeGeneration.Design', version: '3.1.1'
    path: 'lib/netcoreapp3.1/dotnet-aspnet-codegenerator-design.dll'        //把这个文件在编译目录找找复制到服务器上 发现此文件上传时没传到服务器
Error:
  An assembly specified in the application dependencies manifest (Senparc.Weixin.Sample.NetCore3.deps.json) was not found:
    package: 'Microsoft.VisualStudio.Web.CodeGeneration.Design', version: '3.1.1'
    path: 'lib/netcoreapp3.1/dotnet-aspnet-codegenerator-design.dll'

事件 Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="IIS AspNetCore Module V2" />
    <EventID Qualifiers="0">1020</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2021-01-06T00:40:11.380192000Z" />
    <EventRecordID>1309</EventRecordID>
    <Channel>Application</Channel>
    <Computer>server</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application '/LM/W3SVC/2/ROOT' with physical root 'C:\wwwroot\' failed to start process with commandline 'dotnet .\Senparc.Weixin.Sample.NetCore3.dll' with multiple retries. Failed to bind to port '12638'. First 30KB characters of captured stdout and stderr logs from multiple retries:
Error:
  An assembly specified in the application dependencies manifest (Senparc.Weixin.Sample.NetCore3.deps.json) was not found:
    package: 'Microsoft.VisualStudio.Web.CodeGeneration.Design', version: '3.1.1'
    path: 'lib/netcoreapp3.1/dotnet-aspnet-codegenerator-design.dll'
Error:
  An assembly specified in the application dependencies manifest (Senparc.Weixin.Sample.NetCore3.deps.json) was not found:
    package: 'Microsoft.VisualStudio.Web.CodeGeneration.Design', version: '3.1.1'
    path: 'lib/netcoreapp3.1/dotnet-aspnet-codegenerator-design.dll'
</Data>
    <Data>Process Id: 6848.</Data>
    <Data>File Version: 13.1.20234.8. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: c75b3f7a2fb9fe21fd96c93c070fdfa88a2fbe97</Data>
  </EventData>
</Event>

通过日志文件发现,是文件缺失了

在吐槽一下 迭代了无数次的开源框架,那代码读个配置文件又是接口又是层层的调,对于急于开发某个功能的项目,直接成了拦路虎.. 就是个读配置,搞什么全局注册什么玩意,就那么简单的功能非要弄些故弄玄虚的东西....

那个json 配置 netcore 的问题..

 

posted on 2021-01-06 09:30  小石头的一天  阅读(845)  评论(0编辑  收藏  举报