question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After publish to IIS, app does not log to stdout

See original GitHub issue

Steps to reproduce

Target 1.1.1 .net core VS2017. Deploy app to IIS using standard Program.cs–

var host = new WebHostBuilder()
                .UseKestrel()
                .UseUrls("http://localhost:5001")
                .UseContentRoot(Directory.GetCurrentDirectory())
                .UseIISIntegration()
                .UseStartup<Startup>()
                .UseApplicationInsights()
                .Build();

enable logging via published web.config file

stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"

Expected behavior

Expect log\stdout_xxxx file to be created and updated when server errors occur.

Actual behavior

No file is created, no event in event viewer

Environment data

dotnet --info output: N/A, production IIS machine

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
toddlangdoncommented, Sep 8, 2018

I was having this same problem. Verified that web.config had stdoutLogEnabled=“true”, that logs folder existed and app pool identity had write permissions but still no log file. After I manually recycled App Pool it started working - you you might want to try that

8reactions
fernandezjosecommented, Aug 11, 2018

I have everything “in place”, including IIS APPPOOL, however, nothing is being outputted. I am using .Net Core 2.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where do logs go when running ASP.NET Core on IIS 7.5?
1) Go to the app service. · 2) Go to Advanced Tools which takes you to https://{your app service}.scm.azurewebsites.net/ · 3) Click on...
Read more >
Log creation and redirection with the ASP.NET Core Module
When publishing an app for Azure App Service deployment, the Web SDK sets the stdoutLogFile value to \\?\%home%\LogFiles\stdout . The %home ...
Read more >
Enabling ASP.NET Core stdout log (Windows Server)
Navigate to the site's deployment folder on the hosting system. · If the logs folder isn't present, create the folder. · Edit the...
Read more >
Logs are not generating on publish
I configured Microsoft Logger in Blazor Wasm with Asp.net core web APi but after publishing to server the logs are not generating in...
Read more >
ASP.NET Core IIS InProcess Hosting Issue in .NET Core 3.1
First things First: Turn on Logging​​ So the first thing I always do when I have IIS hosting startup problems is to enable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found