当前位置:网站首页>Log cannot be recorded after log4net is deployed to the server
Log cannot be recorded after log4net is deployed to the server
2022-07-04 09:33:00 【Dandelion_ drq】
It can be recorded in the development environment , But not after the release . I have been troubled by this problem for a long time , Today, I finally found the reason !!
my log4net The configuration file is written separately , It is saved in the root directory of the project .
The way to specify the configuration file is through AssemblyInfo.cs add to [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)] This code specifies .

Above is my project structure . I encapsulated one in the project LogHelper, call log4net Methods of are written in this class , This class is in the Common Under the project , Then other projects cite Common Under the LogHelper, So I only changed the quoted Common Project AssemblyInfo.cs file , And the correct way is to modify the main project AssemblyInfo.cs file !!
ok …… After the change, it was OK ……OTL
PS: If you use the method of recording to file , You may need to give IIS_IUSRS User configured folder read and write permissions .
边栏推荐
- Opencv environment construction (I)
- Research Report on research and investment prospects of China's testing machine industry (2022 Edition)
- Summary of the most comprehensive CTF web question ideas (updating)
- 20220701 barbarat lemma proof
- SSM online examination system source code, database using mysql, online examination system, fully functional, randomly generated question bank, supporting a variety of question types, students, teache
- Some points needing attention in PMP learning
- Write a jison parser from scratch (5/10): a brief introduction to the working principle of jison parser syntax
- Jianzhi offer 09 realizes queue with two stacks
- Target detection -- intensive reading of yolov3 paper
- LeetCode 74. Search 2D matrix
猜你喜欢

2022-2028 global small batch batch batch furnace industry research and trend analysis report

165 webmaster online toolbox website source code / hare online tool system v2.2.7 Chinese version

Sword finger offer 30 contains the stack of Min function

After unplugging the network cable, does the original TCP connection still exist?

PHP student achievement management system, the database uses mysql, including source code and database SQL files, with the login management function of students and teachers

Clion console output Chinese garbled code

Markdown syntax

Opencv environment construction (I)
![Langage C - démarrer - base - syntaxe - [opérateur, conversion de type] (vi)](/img/3f/4d8f4c77d9fde5dd3f53ef890ecfa8.png)
Langage C - démarrer - base - syntaxe - [opérateur, conversion de type] (vi)
![C language - Introduction - Foundation - syntax - [main function, header file] (II)](/img/5a/c6a3c5cd8038d17c5b0ead2ad52764.png)
C language - Introduction - Foundation - syntax - [main function, header file] (II)
随机推荐
China electronic grade sulfur trioxide Market Forecast and investment strategy report (2022 Edition)
Talk about single case mode
什么是权限?什么是角色?什么是用户?
A subclass must use the super keyword to call the methods of its parent class
Write a jison parser from scratch (1/10):jison, not JSON
如何编写单元测试用例
Report on research and investment prospect prediction of China's electronic grade sulfuric acid industry (2022 Edition)
How does idea withdraw code from remote push
`Example of mask ` tool use
Write a jison parser from scratch (5/10): a brief introduction to the working principle of jison parser syntax
Pueue data migration from '0.4.0' to '0.5.0' versions
《网络是怎么样连接的》读书笔记 - WEB服务端请求和响应(四)
Research and investment strategy report of China's electronic hydrogen peroxide industry (2022 Edition)
UML 时序图[通俗易懂]
Write a jison parser (7/10) from scratch: the iterative development process of the parser generator 'parser generator'
What is permission? What is a role? What are users?
20220701 Barbalat引理证明
165 webmaster online toolbox website source code / hare online tool system v2.2.7 Chinese version
2022-2028 global industry research and trend analysis report on anterior segment and fundus OTC detectors
Langage C - démarrer - base - syntaxe - [opérateur, conversion de type] (vi)