2015-11-24 13 views
7

Nie mogę już tworzyć plików dziennika przy użyciu programów ASP.NET RC1 i HttpPlatformHandler.Dlaczego HttpPlatformHandler nie tworzy plików dziennika?

To jest ostrzeżenie w dzienniku zdarzeń:

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. 

odpowiednie wersje oprogramowania:

  • Microsoft Platform Handler HTTP 1.2
  • Windows Server 2012 R12
  • ASP.NET 5 RC1 podanie.

Próbowałem różnych wartości dla argumentu stdoutLogFile. Używam (słaba) Documenation z http://www.iis.net/learn/extensions/httpplatformhandler/httpplatformhandler-configuration-reference

Próbowałem:

  • \ c: \ temp \ wtlogs \
  • c: \ temp \ wtlogs \
  • bez wartości (próba zalogowania go do katalogu "dzienniki", że miejsca obok wwwroot i 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> 

Mam zestaw uprawnień: enter image description here

i basen aplikacja jest:

enter image description here

+0

Czy możesz spróbować jeszcze kilku rzeczy: (1) Podaj rzeczywistą * nazwę pliku *, np. 'stdout.log'. (2) Użyj domyślnej ścieżki, która jest ".. \ logs \ stdout.log" (i jako taka loguje się do folderu równoległego do folderów 'wwwroot' i' approot'). (3) Czy możesz spróbować nadać uprawnienia do zapisu wszystkim użytkownikom? – poke

+1

poke, próbowałem pełnej nazwy, dałem pełne uprawnienia do "Użytkownicy". To, co zadziałało, używa domyślnej ścieżki (.. \ logs \ stdout.log). Powinieneś dodać to jako odpowiedź. –

+0

Mam ten sam problem, ale już rozwiązany na [IISIntegration # 45] (https://github.com/aspnet/IISIntegration/issues/45) – zhengchun

Odpowiedz

0

Należy użyć nazwy pliku jako stdoutLogFile wartości, spróbuj użyć c:\temp\wtlogs\stdout.log

+0

Próbowałem to: C: \ temp \ wtlogs \ stdout.log, bez powodzenia . –

+0

Co to jest komunikat dziennika zdarzeń, gdy próbujesz użyć nazwy pliku? –

+0

To samo, co w moim oryginalnym pytaniu. Jedyne, co mogłem dostać do pracy, to używanie .. \ logs \ stdout.log. –

3

ten config jest tworzenie pliku dziennika w folderze "c: \ temp". Musisz najpierw utworzyć folder "c: \ temp".

<aspNetCore processPath="dotnet" arguments=".\Api.dll" stdoutLogEnabled="true" stdoutLogFile="c:\temp\" forwardWindowsAuthToken="false" /> 
Powiązane problemy