I can't figure out how to get errors to show with any type of client (MVC, JavaScript, etc.) using IdentityServer4 on a production server.
I have it set to "debug" for the configuration in publish/settings.
I have fixed the issue with regards to the "logs" folder being created by adding the following to the project file:
<TargetName="CreateLogsFolder"AfterTargets="Publish"><MakeDirDirectories="$(PublishDir)Logs"Condition="!Exists('$(PublishDir)Logs')"/><WriteLinesToFileFile="$(PublishDir)Logs\.log"Lines="Generated file"Overwrite="True"Condition="!Exists('$(PublishDir)Logs\.log')"/></Target>
web.config is configured with stdoutLogEnabled ="true" as in the following.
<aspNetCoreprocessPath="dotnet"arguments=".\MvcClient.dll"stdoutLogEnabled="true"stdoutLogFile=".\logs\.log"/>
My environment variable is set to development.
This is what I have in configure of the startup.cs file:
if(env.IsDevelopment()){ app.UseDeveloperExceptionPage(); app.UseBrowserLink(); app.UseDatabaseErrorPage();}else{ app.UseExceptionHandler("/Home/Error");}
And the only message I get in the .log file is "Generated File".
Thanks!
</div> </div>