FATAL NServiceBus Failure to process messages
System.UnauthorizedAccessException: Access to the path is denied.
i have a simple setup with 2 console projects, one sends a command, the other handles, works fine.
I also have a web api, in the web api (local IIS, dev machine), i have the same console code in my global.asax file.
But when i run i get spammed with the same message, full stack trace below:
2017-12-14 15:58:28.699 FATAL NServiceBus Failure to process messages
System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at NServiceBus.DirectoryBasedTransaction.BeginTransaction(String incomingFilePath)
at NServiceBus.LearningTransportMessagePump.<InnerProcessMessages>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at NServiceBus.LearningTransportMessagePump.<ProcessMessages>d__6.MoveNext()
Event 7 was called with 5 argument(s) , but it is defined with 6 paramenter(s).
Anyone have an idea why this would happen? I can provide some code if required but its fairly simple beginner implimentation
figured it was the app pool identity privelages that was causing the auth issue, but visual studio(2017) is spamming me with the “event 7” stuff thousands a second, anyone else seen this issue?
Thank you for your reply. But I’m not using Stackify . It worked well on .net core console app, but the errors appeared when I’m trying to work with .net core web application.
I don’t know what is “Event 7” error. Sorry about that. I got only errors like:
2018-01-29 19:54:27.402 FATAL NServiceBus Failure to process messages
System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.Win32FileSystem.MoveFile(String sourceFullPath, String destFullPath)
at System.IO.File.Move(String sourceFileName, String destFileName)
at NServiceBus.AsyncFile.<Move>d__9.MoveNext() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Transports\Learning\AsyncFile.cs:line 103
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NServiceBus.LearningTransportMessagePump.<InnerProcessMessages>d__7.MoveNext() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Transports\Learning\LearningTransportMessagePump.cs:line 174
I’m using .net core 2.1.4 and NServiceBus 7 beta 0012.
This indicates that your app pool identity does not have permissions to modify files/folders.
Perform one or more of the following to resolve your permission issue:
Recursively change permissions on the folder where the learning transport stores its data via the windows explorer.
Change the app pool to a different user that does have write access to the learning transport folder in IIS.
Select a different folder for the learning transport to store its data by adjusting the NServiceBus endpoint configuration as documented at the following location:
It looks like an error from app pool permission. This bug will have appeared when I run the application from IIS. If I run it from VS2017, it works well.
If your app pool its identity has write access to the folder C:\Data\project\Learn\test then you should not get this error.
Alternatively, you can use the following tool from Sysinternals and see what is denied. That tool should show the same errors but potentially you see more info.