在发布到IIS的webApi项目中,运行时报出以上错误,

解决方法:

1、打开发布目录文件夹,找到web.config文件

2、打开web.config找到stdoutLogEnabled="false",把该值改为true,即->stdoutLogEnabled="true"

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\CMS.WebApi.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
</location>
</configuration>

3、新建logs文件夹,再次运行网站,这时会自动生成一个log文件到logs文件夹中,打开即可查看报错原因进行处理了。

NETCore项目报错 An error occurred while starting the application的更多相关文章

  1. SOAPtest报错:error occurred during initialization of vm解决方法

    参考:http://forums.parasoft.com/index.php?act=ST&f=36&t=614 安装SOAPtest报错:error occurred during ...

  2. apache include 文件包含引用的方法 报错 [an error occurred while processing this directive]

    今天遇到在某平台买的虚拟主机服务器不支持    下面的这样的写法 <!--#Include file="/templets/2013new/header.htm"--> ...

  3. eclipse 中离线安装activiti插件,报错“An error occurred while collecting items to be installed session context was:(...”

    eclipse 中离线安装activiti插件,报错“An error occurred while collecting items to be installed session context ...

  4. An error occurred while starting the application.

    一..net core 发布后的站点启动报错如下 An error occurred while starting the application. .NET Core 4.6.26328.01 X6 ...

  5. [转].Net Core Web应用发布至IIS后报“An error occurred while starting the application”错误

    本文转自:http://www.cnblogs.com/TomGui/p/6438686.html An error occurred while starting the application. ...

  6. .Net Core Web应用发布至IIS后报“An error occurred while starting the application”错误

    An error occurred while starting the application. .NET Core X64 v4.1.1.0    |   Microsoft.AspNetCore ...

  7. 踩坑系列《三》 java -version 报错出现Error occurred during initialization of VM java/lang/NoClassDefFoundError:

    之前导入一个项目,因为该项目Spring版本过低,只能适用于1.7版本,装了jdk1.7版本.安装配置好后,打开cmd窗口,执行 java -version 指令发现没像正常一样显示版本信息,而是报了 ...

  8. idea创建maven项目报错,Error initializing: org.codehaus.plexus.velocity.DefaultVelocityComponent@56da52a7 java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils

    学着使用idea,想创建个maven项目,但是出师不利,立马报错,贼尴尬,错误信息如下: D:\Develop\JDK\bin\java.exe -Dmaven.multiModuleProjectD ...

  9. intelj idea编译项目报错,Error:ajc: The method getDestHost() is undefined

    一.问题简述 这两天在idea中引入过aspectJ相关的东西,用到了aspectJ的编译器进行编译时织入. 结果今天在编译一个老项目时,(用到了lombok,lombok的idea插件会在javac ...

随机推荐

  1. Android 性能优化(1)性能工具之「 lint 」 :Improving Your Code with lint:优化代码

    Improving Your Code with lint 1.See Also lint (reference) Using Android Annotations In addition to t ...

  2. 398 Random Pick Index 随机数索引

    给定一个可能含有重复元素的整数数组,要求随机输出给定的数字的索引. 您可以假设给定的数字一定存在于数组中.注意:数组大小可能非常大. 使用太多额外空间的解决方案将不会通过测试.示例:int[] num ...

  3. CircuitBreaker design pattern---reference

    It's common for software systems to make remote calls to software running in different processes, pr ...

  4. working hard to be a professional coder

    1:read 2 : code 3 : 勤奋 4:技术栈 就前端主流技术框架的发展而言,过去的几年里发展极快,在填补原有技术框架空白和不足的同时也渐渐趋于成熟.未来前端在已经趋向成熟的技术方向上面将会 ...

  5. 如何删除sublime目录

    左侧栏的sublime目录一直删不掉,删除列直接变成了灰色. 今天才发现应该选择文件夹右击选择工程——从工程中删除文件夹. 这个设计真的很醉,删除这么常用的键还放进了第二层……

  6. acm练习-day1_1

    “麻雀”lengdan用随机数生成了后台数据,但是笨笨的他被妹纸的问题给难住了... 已知lengdan生成了N(1=<N<=10005)个随机整数,妹子对这些数可能有以下几种操作或询问: ...

  7. 微软MVC框架实战:开源的JS库Knockout

    [IT168 技术] Knowckout – 当MVC遭遇MVVM Knockout (或者Knockout.js ,KnockoutJS)是一个开源的JavaScript库,网址为www.knock ...

  8. socket相关函数

    socket() 我们使用系统调用socket()来获得文件描述符:#include<sys/types.h>#include<sys/socket.h>int socket( ...

  9. 【转】非常好的Java反射例子

    转自 http://www.douban.com/note/306848299/ 原文: 1.Java反射的概念 反射含义:可以获取正在运行的Java对象. 2.Java反射的功能 1)可以判断运行时 ...

  10. HDU_1074_Doing Homework_状态压缩dp

    链接:http://acm.hdu.edu.cn/showproblem.php?pid=1074 Doing Homework Time Limit: 2000/1000 MS (Java/Othe ...