我无法再使用 ASP.NET RC1 和 HttpPlatformHandler 创建日志文件。
这是事件日志中的警告:
The description for Event ID 1004 from source HttpPlatformHandler cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Warning: Could not create stdoutLogFile , ErrorCode = -2147024843.
相关软件版本:
- Microsoft Http 平台处理程序 1.2
- window 服务器 2012 R12
- ASP.NET 5 RC1 应用程序。
我已经为 stdoutLogFile 参数尝试了各种值。我正在使用来自 http://www.iis.net/learn/extensions/httpplatformhandler/httpplatformhandler-configuration-reference 的(糟糕的)文档
我试过:
- \?c:\temp\wtlogs\
- c:\temp\wtlogs\
- 没有值(value)(尝试将其登录到位于 wwwroot 和 approot 旁边的“logs”目录)
网络配置:
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="..\approot\prod.cmd" arguments="" stdoutLogEnabled="true" stdoutLogFile="\\?c:\temp\wtlogs\" startupTimeLimit="3600" forwardWindowsAuthToken="false"></httpPlatform>
</system.webServer>
</configuration>
应用程序池是:
最佳答案
此配置在“c:\temp”文件夹中创建一个日志文件。 您必须先创建“c:\temp”文件夹。
<aspNetCore processPath="dotnet" arguments=".\Api.dll" stdoutLogEnabled="true" stdoutLogFile="c:\temp\" forwardWindowsAuthToken="false" />
关于c# - 为什么 HttpPlatformHandler 不创建日志文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33901121/