You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the solution did not work for me and I am using serilog-sinks-file. The issue does seem related to that the account under which the web service is running doesn't have permission to write at all. In the case of Azure Cloud Service (classic) the default account used to run Web services and associated App Pools is "NETWORK SERVICE".
I have done a bit a digging and found some outdated references addressing this issue programmatically in web Service Startup.
I have not yet tried the provided solution and was hoping there was a better approach now. Possibly defining the application identity in the ServiceDefinition.csdef in my deployment project. But I have not found anything in the "<ServiceDefinition>" schema docs. I was hoping for some parameter in the "<WebRole>" definition, but apparently not.
I realize this is not specifically a "problem" with Serilog, and more of an Azure deployment issue, but was hoping that someone here may have some insight. As the old InterWeb isn't giving me the usual satisfaction...
Thanks!
Eric
BTW- And yes, I hope to move to Azure App Service soon, but stuck in the classic env for now.
The text was updated successfully, but these errors were encountered:
Closing on the basis that troubleshooting stuff like this is hairy and thorny, and not something that belongs in this repo's issue list. Suggest-re-raising either:
somewhere specific to that hosting arrangement (more relevant expertise)
stack overflow (many times more traffic than here)
The bottom line is that this Sink will have identical issues to any direct System.IO.File writes in any given context
This is related to: serilog/serilog-sinks-rollingfile#34
But the solution did not work for me and I am using serilog-sinks-file. The issue does seem related to that the account under which the web service is running doesn't have permission to write at all. In the case of Azure Cloud Service (classic) the default account used to run Web services and associated App Pools is "NETWORK SERVICE".
I have done a bit a digging and found some outdated references addressing this issue programmatically in web Service Startup.
https://www.wadewegner.com/2011/01/programmatically-changing-the-apppool-identity-in-a-windows-azure-web-role/
and related
https://social.msdn.microsoft.com/Forums/en-US/e44fe0c0-4b9a-4e57-a653-c55ffa08dcb0/access-rights-on-azure-configuration?forum=windowsazuredevelopment
I have not yet tried the provided solution and was hoping there was a better approach now. Possibly defining the application identity in the ServiceDefinition.csdef in my deployment project. But I have not found anything in the "<ServiceDefinition>" schema docs. I was hoping for some parameter in the "<WebRole>" definition, but apparently not.
I realize this is not specifically a "problem" with Serilog, and more of an Azure deployment issue, but was hoping that someone here may have some insight. As the old InterWeb isn't giving me the usual satisfaction...
Thanks!
Eric
BTW- And yes, I hope to move to Azure App Service soon, but stuck in the classic env for now.
The text was updated successfully, but these errors were encountered: