2015-11-24 2 views
7

Я больше не могу создавать файлы журналов с помощью ASP.NET RC1 и HttpPlatformHandler.Почему 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 Platform Handler 1.2
  • Windows Server 2012 R12
  • ASP.NET 5 RC1 заявление.

Я пробовал различные значения для аргумента stdoutLogFile. Я использую (плохой) documenation из http://www.iis.net/learn/extensions/httpplatformhandler/httpplatformhandler-configuration-reference

Я пробовал:

  • \ с: \ Temp \ wtlogs \
  • C: \ Temp \ wtlogs \
  • нет значения (чтобы попытаться войти его в каталог "журналы", что сайты подле Wwwroot и approot)

web.config:

<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> 

У меня есть набор разрешений: enter image description here

и приложение бассейн является:

enter image description here

+0

Можете ли вы попробовать еще несколько вещей: (1) Укажите фактическое * имя файла *, например. 'Stdout.log'. (2) Используйте путь по умолчанию, который является '.. \ logs \ stdout.log' (и как таковой входит в папку, параллельную папкам' wwwroot' и 'approot''). (3) Можете ли вы попробовать дать разрешение на запись всем пользователям? – poke

+1

poke, я попробовал полное имя, я дал полные разрешения «Пользователям». В работе используется путь по умолчанию (.. \ logs \ stdout.log). Вы должны добавить это как ответ. –

+0

У меня такая же проблема, но уже решена в [IISIntegration # 45] (https://github.com/aspnet/IISIntegration/issues/45) – zhengchun

ответ

0

Вы должны использовать имя файла в качестве stdoutLogFile значения, попробуйте использовать c:\temp\wtlogs\stdout.log

+0

Я пробовал это: C: \ temp \ wtlogs \ stdout.log, не повезло , –

+0

Что такое сообщение журнала событий при попытке имени файла? –

+0

То же, что и в моем исходном вопросе. Единственное, на что я мог работать, - это использовать \ logs \ stdout.log. –

3

Эта конфигурация является создавая файл журнала в папке «c: \ temp». Вы должны сначала создать папку c: \ temp.

<aspNetCore processPath="dotnet" arguments=".\Api.dll" stdoutLogEnabled="true" stdoutLogFile="c:\temp\" forwardWindowsAuthToken="false" /> 
Смежные вопросы