When a new order i see this error

[General Info]

Application: SambaPOS
Version:     5.3.0
Region:      tr
DB:          SQ
Machine:     DESKTOP-EHLVKGL
User:        User
Date:        12.11.2020
Time:        16:38

User Explanation:

User said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.Reflection.TargetInvocationException
Message:     Özel durum bir çağırma hedefi tarafından oluşturuldu.
Source:      mscorlib
Stack Trace: konum: System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   konum: System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   konum: System.Delegate.DynamicInvokeImpl(Object[] args)
   konum: System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   konum: System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Inner Exception 1
Type:        System.UnauthorizedAccessException
Message:     'C:\Users\User\Documents\SambaPOS5\log.txt' yoluna erişim reddedildi.
Source:      mscorlib
Stack Trace: konum: System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   konum: System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   konum: System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   konum: System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   konum: System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   konum: System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   konum: System.IO.File.InternalAppendAllText(String path, String contents, Encoding encoding)
   konum: System.IO.File.AppendAllText(String path, String contents)
   konum: Samba.Infrastructure.ExceptionReporter.Logger.Log(String message, String fileName)
   konum: Samba.Services.Implementations.LogService.Log(String message) C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\LogService.cs içinde: satır 29
   konum: Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWithoutLogging(Object ruleData) C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\RuleExecutor.cs içinde: satır 150
   konum: Samba.Services.Implementations.AutomationModule.RuleExecutor.ExecuteWith(Object dataParameter) C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\RuleExecutor.cs içinde: satır 62
   konum: Samba.Services.Implementations.AutomationModule.NotificationService.NotifyEvent(String eventName, Object dataParameter, AppState appState) C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\AutomationModule\NotificationService.cs içinde: satır 26
   konum: Samba.Services.Implementations.TicketModule.TicketServiceBase.AddOrder(Ticket ticket, MenuItem menuItem, Nullable`1 quantity, Boolean enforceQuantity, String portionName, String orderState, String orderTagJson, AppState appState, Nullable`1 price) C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\TicketModule\TicketServiceBase.cs içinde: satır 206
   konum: Samba.Presentation.Services.Implementations.TicketModule.TicketService.AddOrder(Ticket ticket, Int32 menuItemId, Nullable`1 quantity, Boolean enforceQuantity, String portionName, String orderState, String orderTagJson)
   konum: Samba.Presentation.ClientLibrary.Modules.PosModule.TicketOrdersViewModel.AddOrder(Int32 menuItemId, Nullable`1 quantity, Boolean enforceQuantity, String portionName) C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\PosModule\TicketOrdersViewModel.cs içinde: satır 209
   konum: Samba.Presentation.ClientLibrary.Modules.PosModule.TicketOrdersViewModel.AddOrder(ScreenMenuItemData data) C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\PosModule\TicketOrdersViewModel.cs içinde: satır 216
   konum: Samba.Presentation.ClientLibrary.Modules.PosModule.PosViewModel.OnMenuItemSelected(EventParameters`1 obj) C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\PosModule\PosViewModel.cs içinde: satır 484
   konum: Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   konum: Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
   konum: Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   konum: Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   konum: Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)

-----------------------------

[Assembly Info]

mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Samba.Services, Version=5.3.7390.41537
Samba.Domain, Version=5.3.7390.41536
Samba.Infrastructure.Data, Version=5.3.7390.41536
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Presentation.Services, Version=5.3.7390.41539
System.Core, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
DevExpress.Xpf.LayoutControl.v17.2, Version=17.2.13.0
System.Xml, Version=4.0.0.0
DevExpress.Xpf.Grid.v17.2, Version=17.2.13.0
DevExpress.Xpf.Grid.v17.2.Core, Version=17.2.13.0
System.Xaml, Version=4.0.0.0
Samba.Infrastructure, Version=5.3.7390.41533
Microsoft.Practices.Prism, Version=4.0.0.0
System.Runtime.Serialization, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
DevExpress.Xpf.Core.v17.2, Version=17.2.13.0
System.Windows.Forms, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
Samba.Persistance, Version=5.3.7390.41536
Stateless, Version=1.0.0.0
PropertyTools, Version=2012.4.14.1
Samba.Localization, Version=5.3.7390.41534
ReachFramework, Version=4.0.0.0
EntityFramework, Version=6.0.0.0
FluentValidation, Version=3.4.0.0
NCalc, Version=1.3.8.0
Microsoft.CSharp, Version=4.0.0.0
Omu.ValueInjecter, Version=2.3.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
DevExpress.Data.v17.2, Version=17.2.13.0
WindowsInput, Version=1.0.4.0

-----------------------------

[System Info]

Operating System
-Microsoft Windows 10 Pro
--CodeSet = 1254
--CSDVersion = 
--CurrentTimeZone = 180
--FreePhysicalMemory = 10127884
--OSArchitecture = 64 bit
--OSLanguage = 1055
--ServicePackMajorVersion = 0
--ServicePackMinorVersion = 0
--Version = 10.0.18363

Machine
-DESKTOP-EHLVKGL
--Manufacturer = System manufacturer
--Model = System Product Name
--TotalPhysicalMemory = 17105825792
--UserName = DESKTOP-EHLVKGL\User

-----------------------------

Cant access log.txt in my documents.
Have you configured some logging?

Sambapos does not have access to log.txt in users folder.

You probably have Avast anti virus installed and for some reason it blocks SambaPOS to write in that file. I would recommend you to delete Avast or whitelist the folder/file.

1 Like