Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

No logs in Logs.txt #4066


User avatar
0
advaniamobilepay created

Hi, I'm using angular 2 and .Net 4.6.1 core project and I've published both projects separately in IIS and I'm receiving an 500 server error when using the site. After I have logged in successfully.

There is nothing being logged in logs.txt and I've tried deleting the logs.txt and it is not recreated. When I run the project locally the logs.txt works fine. It is similar to this problem that I found on the forum: [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=10035&p=23013&hilit=not+logging+log.txt#p23013])

What was the solution for this problem? Or do you have any idea what could be the problem?


3 Answer(s)
  • User Avatar
    0
    bilalhaidar created

    Hi, I faced the same issue few days ago and I resolved it by doing this in the Startup.cs file in the Web.Host project.

    //Configure Abp and Dependency Injection
                return services.AddAbp<DrcAppWebHostModule>(options =>
                {
                    //Configure Log4Net logging
                    options.IocManager.IocContainer.AddFacility<LoggingFacility>(
                        f => f.UseAbpLog4Net().WithConfig(System.IO.Path.Combine(_env.ContentRootPath, "log4net.config"))
                    );
                });
    

    I just configure the proper Path to the log4net.config file.

    Try it.

    HTH Bilal

  • User Avatar
    0
    alirizaadiyahsi created

    Also could you check folder read/write access?

  • User Avatar
    0
    advaniamobilepay created

    Thank you! It works :D :D

    Br Sara