Async/await kullanırken bir hata araştırıyorum. Ancak, aşağıdaki gibi görüntülenir ve satır numarasını göstermez.Satır numarasının nasıl async olmasını bekliyoruz C#
System.UnauthorizedAccessException: Access to the port is denied.
at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.Threading.Semaphore..ctor(Int32 initialCount, Int32 maximumCount, String name)
at StorageServiceIntegration.Managers.StorageServiceManager.d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at StorageServiceIntegration.Managers.StorageServiceManager.d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at StorageServiceIntegration.Managers.StorageServiceManager.d__32.MoveNext()
Satır numarası ve kodun nerede gösterilemediği? Kullanıyorum. Net 4.6.1
İstisnanız, uygulamayı çalıştırdığınız kullanıcı hesabının bir semafor oluşturmasına izin verilmediğinden atılır. Bu sorun benzer [Windows 7'de standart kullanıcı olarak semafor oluşturamaz] (http://stackoverflow.com/questions/14530886/cannot-create-a-semaphore-as-standard-user-on-windows-7) . – Serge
benim durumumda değil, semaphore.WaitOne() sonra bir şey yapar ve veritabanına oturum çünkü bu semafor oluşturabilir. –
'async', istisna tarafından döndürülen çağrı yığını ile ilgisi yoktur. Arama yığınındaki satır numaralarını görmek için hata ayıklama sembollerine ve/veya kütüphaneye ait kaynak kodunuzun olması gerekir. –