Pergunta

I am using elmah to log files in MVC. here is the setting for the logPath in web.congif file but i want to store the logs on the UNC path.(Network path)

I tried directly using UNC path but it does not work. eg \\NetworkPath\ErrorLogs\Errors

<elmah>
  <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/XML_Logs" />
</elmah>

What am i doing wrong.

Foi útil?

Solução

In order for the UNC path to work, you will need to ensure that the account your IIS site is running under (in most cases this is the account your sites Application Pool runs under) has access to the the UNC share you are specifying.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top