为什么HttpPlatformHandler不能创建日志文件?
我不能再使用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.
相关软件版本:
我已经尝试了stdoutLogFile参数的各种值。 我使用来自http://www.iis.net/learn/extensions/httpplatformhandler/httpplatformhandler-configuration-reference的(穷人)文档
我试过了:
web.config中:
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="..approotprod.cmd" arguments="" stdoutLogEnabled="true" stdoutLogFile="?c:tempwtlogs" 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" />
您应该使用文件名作为stdoutLogFile
值,尝试使用c:tempwtlogsstdout.log