GetWorkItemAsync method exception when called from multiple threads C#.Net - c#

I am trying to get the links from VSO for workitems, and the code seems to work fine when called from a single thread, but throws exceptions when called from a parallel for each loop.
I initalize my vso client object in my class's constructor:
vso = new WorkItemReporting(Config.VSTSAccessToken);
Then later in a method:
Parallel.ForEach(msrcAbBugsToProcess, new ParallelOptions { MaxDegreeOfParallelism = 10 }, bugId =>
{
var workItemLinks = vso.GetWorkItemSourceCodeLinks(bugId);
});
witclient below is a WorkItemTrackingHttpClient which is in a different class (WorkItemReporting) and calls the API. It is this call that fails.
public List<string> GetWorkItemSourceCodeLinks(int bugId)
{
var workItemSourceCodeLinks = new List<string>();
var workItem = _witClient.GetWorkItemAsync(bugId, null, null, WorkItemExpand.Relations).Result;
if (workItem?.Relations != null)
{
var validSourceCodeLinkTypes = new List<string> { "ArtifactLink", "Hyperlink" };
foreach (var relation in workItem.Relations)
{
if (validSourceCodeLinkTypes.Contains(relation.Rel))
{
workItemSourceCodeLinks.Add(relation.Url);
}
}
}
}
This works fine if I don't use the Parallel.ForEach and I get the needed data from the API. When I do, I get this exception 50% of the time:
Object reference not set to an instance of an object.
at System.Security.Cryptography.X509Certificates.X509CertificateCollection.GetHashCode()
at System.Net.HttpWebRequest.GetConnectionGroupLine()
at System.Net.HttpWebRequest.SubmitRequest(ServicePoint servicePoint)
at System.Net.HttpWebRequest.BeginGetResponse(AsyncCallback callback, Object state)
at System.Net.Http.HttpClientHandler.StartGettingResponse(RequestState state)
at System.Net.Http.HttpClientHandler.StartRequest(Object obj)
--- 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.ValidateEnd(Task task)
at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__17.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 Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.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 Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.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 Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.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 Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__27`1.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 Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__26`1.MoveNext()
Is there something I'm doing wrong?

A solution is to create WorkItemReporting inside Parallel.ForEach:
Parallel.ForEach(msrcAbBugsToProcess, new ParallelOptions { MaxDegreeOfParallelism = 10 }, bugId =>
{
var vso = new WorkItemReporting(Config.VSTSAccessToken);
var workItemLinks = vso.GetWorkItemSourceCodeLinks(bugId);
});

You need to lock access to the external resource by doing something like the following.
As per comment #AlexSikilinda _witClient must not be thread safe.
For what your doing though, just because you can create multiple threads doesn't means you should, i would get timings, on what your doing with and without the parallel processing in your code,
Keep in mind if you use non thread safe external resources, and locks then it maybe just as slow as running in a normal for loop. You need to test both scenario's.
Add an object outside your methods to allow access to the lock object from every thread, this will help manage the access to the non thread safe class.
vso = new WorkItemReporting(Config.VSTSAccessToken);
private readonly object _witLock = new object();
In the following you DON'T want to put the lock around the entire methods contents as i have, otherwise you are definitely wasting your time using the Parallel for this piece of code.
Based on what your doing thought this should stop the exceptions.
You need refactor the code so that only the call to _witClient is within the lock. So just declare the workItem variable outside the lock with it proper type, and then only wrap the call to workItem = _witClient.GetWorkItemAsync(bugId, null, null, WorkItemExpand.Relations).Result; in your lock code.
public List<string> GetWorkItemSourceCodeLinks(int bugId)
{
var workItemSourceCodeLinks = new List<string>();
lock (_witLock)
{
var workItem = _witClient.GetWorkItemAsync(bugId, null, null, WorkItemExpand.Relations).Result;
if (workItem?.Relations != null)
{
var validSourceCodeLinkTypes = new List<string> { "ArtifactLink", "Hyperlink" };
foreach (var relation in workItem.Relations)
{
if (validSourceCodeLinkTypes.Contains(relation.Rel))
{
workItemSourceCodeLinks.Add(relation.Url);
}
}
}
}
}
Good Luck

Related

Cloud firestore WhereIn method not working in .Net

I am using google.cloud.firestore package in .net core and I want to query the documents that have a specific field value existing in a provided list of values (like the IN command in sql). I came across the WhereIn method but I keep getting an exception. I have been trying for the last few hours but no success!
Here is the code:
public async Task<List<Document>> GetListByAccountRef(List<string> accountRefs)
{
var docRef = _Firestore.Collection("documents").WhereIn("AccountRef", accountRefs);
var docsQuery = await docRef.GetSnapshotAsync();
var docs = docsQuery.Select(d => d.ConvertTo<Document>()).ToList();
return docs;
}
I get an exception on the second line:
var docsQuery = await docRef.GetSnapshotAsync();
This is the error message:
Status(StatusCode=InvalidArgument, Detail="Unknown FieldFilter operator.")
And here is the stacktrace:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Grpc.Core.Internal.ClientResponseStream`2.<MoveNext>d__5.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Linq.AsyncEnumerable.<ForEachAsync_>d__174`1.MoveNext() in
D:\a\1\s\Ix.NET\Source\System.Interactive.Async\ForEach.cs:line 141
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Google.Cloud.Firestore.Query.<GetSnapshotAsync>d__54.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Docer.DAL.Repositories.DocumentRepository.<GetListByAccountRef>d__7.MoveNext() in E:\Docer\webapp-
FireStore-Branch\Docer.DAL\Repositories\Document\DocumentRepository.cs:line 84
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Docer.BLL.Doc.DocumentBusiness.<GetUserDocuments>d__10.MoveNext() in E:\Docer\webapp-FireStore-
Branch\Docer.BLL.Doc\Document\DocumentBusiness.cs:line 84
Any help is appreciated, thanks.
This worked for me. You can follow the tutorial (https://pieterdlinde.medium.com/netcore-and-cloud-firestore-94628943eb3c)
List<Cities> cities = new List<Cities>()
{
new Cities()
{
CityName="tests"
}
};
Query employeeQuery = fireStoreDb.Collection(nameof(Employee)).WhereIn("City", cities);
QuerySnapshot employeeQuerySnapshot = await employeeQuery.GetSnapshotAsync();
Thanks to Jon, the problem appeared to be from the old version of the firestore emulator that I was using. After updating the emulator, it's working fine.

azure management client doesn't return any resource group

I am new to azure. I am trying to create ResourceGroup then trying to deploy a VM. But I am getting exception during accessing resourcegroups.
I am following MSDN example given here: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/csharp-template
I tried different subscription but no luck. Couldn't find any pointers online for this issue or I might have missed. If you could help me please let me know.
Thanks.
//AppId,Key,TenetId are correct
var credentials = SdkContext.AzureCredentialsFactory
.FromServicePrincipal(ApplicationID, Key, TenetID,
new AzureEnvironment()
{
AuthenticationEndpoint = #"https://login.windows.net/",
ManagementEndpoint = #"https://management.core.windows.net/",
ResourceManagerEndpoint = #"https://management.azure.com/",
GraphEndpoint = #"https://graph.windows.net/",
});
var azure = Azure
.Configure()
.WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)
.Authenticate(credentials)
.WithSubscription(AzureProperties.SubscriptionId);
var groupName = "MyresourceGroup1";
var location = Region.USWest;
//Exception comes at here.
var resourceGroup = azure.ResourceGroups.Define(groupName)
.WithRegion(location)
.Create();
//Exception details.
System.ArgumentNullException
HResult=0x80004003
Message=Value cannot be null.
Parameter name: value
Source=mscorlib
StackTrace:
at System.String.EndsWith(String value, StringComparison comparisonType)
at Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials.<ProcessHttpRequestAsync>d__24.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Azure.Management.ResourceManager.Fluent.ResourceGroupsOperations.<CreateOrUpdateWithHttpMessagesAsync>d__6.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.ResourceManager.Fluent.ResourceGroupImpl.<CreateResourceAsync>d__26.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.Creatable`4.<Microsoft-Azure-Management-ResourceManager-Fluent-Core-ResourceActions-IResourceCreator<IResourceT>-CreateResourceAsync>d__15.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.ResourceManager.Fluent.Core.DAG.CreatorTaskItem`1.<ExecuteAsync>d__6.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.ResourceManager.Fluent.Core.DAG.TaskGroupBase`1.<ExecuteNodeTaskAsync>d__14.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.ResourceManager.Fluent.Core.Extensions.Synchronize[TResult](Func`1 function)
at Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.Creatable`4.Create()
at pvt_CreateVM.AzureVMManager.CreateVM()
at pvt_CreateVM.Program.Main(String[] args)
I think code is currently failing because you haven't set any value for KeyVaultSuffix property for AzureEnvrionment that you have initialized.
It's a guess looking at the error info you have shared but I say this after looking at the relevant source code for Azure Management Libraries for .NET
(on a side note it's awesome that anyone can do that.. here is a link)
public async override Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var adSettings = new ActiveDirectoryServiceSettings
{
AuthenticationEndpoint = new Uri(Environment.AuthenticationEndpoint),
TokenAudience = new Uri(Environment.ManagementEndpoint),
ValidateAuthority = true
};
string url = request.RequestUri.ToString();
if (url.StartsWith(Environment.GraphEndpoint, StringComparison.OrdinalIgnoreCase))
{
adSettings.TokenAudience = new Uri(Environment.GraphEndpoint);
}
string host = request.RequestUri.Host;
// I guess this is where your code is failing currently.
if (host.EndsWith(Environment.KeyVaultSuffix, StringComparison.OrdinalIgnoreCase))
{
How to fix
Unless there is a good reason, I would not initialize AzureEnvironment object and instead use the values already available, as that would make sure all required properties have correct values.
Example: AzureEnvironment.AzureGlobalCloud. Look here for all possible values
Change this code where you initialize AzureEnvironment
var credentials = SdkContext.AzureCredentialsFactory
.FromServicePrincipal(ApplicationID, Key, TenetID,
new AzureEnvironment()
{
AuthenticationEndpoint = #"https://login.windows.net/",
ManagementEndpoint = #"https://management.core.windows.net/",
ResourceManagerEndpoint = #"https://management.azure.com/",
GraphEndpoint = #"https://graph.windows.net/",
});
To this code
var credentials = SdkContext.AzureCredentialsFactory
.FromServicePrincipal(clientId,
clientSecret,
tenantId,
AzureEnvironment.AzureGlobalCloud);
In case you have some reason that none of the available environment values are good enough, then make sure you initialize all required properties for AzureEnvironment

Unobserved task exception under stress during WebSocket SendAsync

I'm stressing a service I'm writing that uses a WebSocket taken from AcceptWebSocketAsync. The code I'm using to send messages through the WebSocket is this:
static bool
SendMessage(WebSocket webSocket, WebSocketMessage message, byte[] buffer, CancellationToken cancellationToken)
{
try {
var endOfMessage = false;
do {
using(var timeout = new CancellationTokenSource(webSocketsTimeout))
using(var lcts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeout.Token)) {
var count = message.Content.Read(buffer, 0, buffer.Length);
endOfMessage = count < buffer.Length;
// ReSharper disable once MethodSupportsCancellation
webSocket
.SendAsync(new ArraySegment<byte>(buffer, 0, count), message.Type, endOfMessage, lcts.Token)
.Wait() // SendAsync should be canceled using the Token.
;
}
} while(endOfMessage == false);
return true;
}
catch(Exception e) {
TraceConnectionError(e);
return false;
}
finally {
message.Dispose();
}
}
My problem is that under "stress" (I'm opening and closing 6 connections every 30 seconds until the system fails), I'm getting:
Unhandled Exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.Net.HttpListenerException: An operation was attempted on a nonexistent network connection
at System.Net.WebSockets.WebSocketHttpListenerDuplexStream.WriteAsyncFast(HttpListenerAsyncEventArgs eventArgs)
at System.Net.WebSockets.WebSocketHttpListenerDuplexStream.<MultipleWriteAsyncCore>d__38.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.Net.WebSockets.WebSocketBase.<SendFrameAsync>d__48.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.ValidateEnd(Task task)
at System.Net.WebSockets.WebSocketBase.WebSocketOperation.<Process>d__19.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.Net.WebSockets.WebSocketBase.<SendAsyncCore>d__47.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.TaskExceptionHolder.Finalize()
Shouldn't the Wait() I'm using be enough to "observe" the Task exception?
The problem was a race condition in .NET framework code.
I've reported the bug here.
As a workaround, I keep a list of used WebSockets which I regularly check for State != Open and then call this code:
public static class WebSocketXs
{
readonly static Assembly assembly = typeof(WebSocket).Assembly;
readonly static FieldInfo m_InnerStream = assembly.GetType("System.Net.WebSockets.WebSocketBase").GetField(nameof(m_InnerStream), BindingFlags.NonPublic | BindingFlags.Instance);
readonly static FieldInfo m_ReadTaskCompletionSource = assembly.GetType("System.Net.WebSockets.WebSocketHttpListenerDuplexStream").GetField(nameof(m_ReadTaskCompletionSource), BindingFlags.NonPublic | BindingFlags.Instance);
readonly static FieldInfo m_WriteTaskCompletionSource = assembly.GetType("System.Net.WebSockets.WebSocketHttpListenerDuplexStream").GetField(nameof(m_WriteTaskCompletionSource), BindingFlags.NonPublic | BindingFlags.Instance);
readonly static FieldInfo[] completionSourceFields = {m_ReadTaskCompletionSource, m_WriteTaskCompletionSource };
/// <summary>
/// This fixes a race that happens when a <see cref="WebSocket"/> fails and aborts after failure.
/// The <see cref="completionSourceFields"/> have an Exception that is not observed as the <see cref="WebSocket.Abort()"/>
/// done to WebSocketBase <see cref="m_InnerStream"/> is just <see cref="TaskCompletionSource{TResult}.TrySetCanceled()"/> which
/// does nothing with the completion source <see cref="Task.Exception"/>.
/// That in turn raises a <see cref="TaskScheduler.UnobservedTaskException"/>.
/// </summary>
public static void
CleanUpAndDispose(this WebSocket ws)
{
foreach(var completionSourceField in completionSourceFields) {
m_InnerStream
.GetValue(ws)
.Maybe(completionSourceField.GetValue)
.Maybe(s => s as TaskCompletionSource<object>)?
.Task
.Exception
.Maybe(_ => {}) // We just need to observe any exception.
;
}
ws.Dispose();
}
}

FileOpenPicker: Can't add complex type to ContinuationData

I am not able to add a custom type to he ContinuationData in the FileOpenPicker. I can add string/int/datetime, but when I try to add my custom CustomFolder object it fails with the following exception.
CustomFolder TargetFolde = new CustomFolder()
FileOpenPicker open = new FileOpenPicker();
open.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
open.ViewMode = PickerViewMode.Thumbnail;
// Filter to include a sample subset of file types
open.FileTypeFilter.Clear();
open.FileTypeFilter.Add(".bmp");
open.FileTypeFilter.Add(".png");
open.FileTypeFilter.Add(".jpeg");
open.FileTypeFilter.Add(".jpg");
KeyValuePair<string, object> fold = new KeyValuePair<string, object>("Folder", TargetFolder);
open.ContinuationData.Add(fold);
open.PickMultipleFilesAndContinue();
}
{System.Exception: Data of this type is not supported. (Exception from
HRESULT: 0x8007065E) at
System.Runtime.InteropServices.WindowsRuntime.IMap2.Insert(K key, V
value) at
System.Runtime.InteropServices.WindowsRuntime.MapToDictionaryAdapter.Insert[K,V](IMap2
_this, K key, V value) at System.Runtime.InteropServices.WindowsRuntime.MapToDictionaryAdapter.Add[K,V](K
key, V value) at
System.Runtime.InteropServices.WindowsRuntime.MapToCollectionAdapter.Add[K,V](KeyValuePair`2
item) at Lockie.Shared.Util.d__1b.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.GetResult()
at Lockie.Folder.d__5.MoveNext()}
Only basic types are allowed. WinRT does not offer a serialization mechanism like .NET
You can serialize the data yourself using XML or JSON and store that as a string.

Access is denied when running an async function twice that writes to local storage

I have a C# project with a service reference against a web service.
I have the following code, first to trigger a method at the service request:
private void Button_Click(object sender, RoutedEventArgs e)
{
App.service.getFileCompleted += service_getFileCompleted;
App.service.getFileAsync(App.user, App.document);
}
And the service_getFileCompleted is supposed to retrieve a byte[], put it into a file and then open that file with the default application:
async void service_getFileCompleted(object sender, BackendReference.getFileCompletedEventArgs e)
{
string tmp = "temp." + e.Result.type;
StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile localFile = await local.CreateFileAsync(tmp, CreationCollisionOption.ReplaceExisting);
using (Stream writeStream = await localFile.OpenStreamForWriteAsync())
{
writeStream.Seek(0, SeekOrigin.End);
await writeStream.WriteAsync(e.Result.fileData, 0, e.Result.fileData.Length);
}
await Windows.System.Launcher.LaunchFileAsync(localFile);
}
}
First time the apps starts, and the button is triggered it works like a charm. However, when pressing the button the second time the row
Stream writeStream = await localFile.OpenStreamForWriteAsync()
casts an System.UnauthorizedAccessException.
More exactly:
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.IO.WindowsRuntimeStorageExtensions.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.IO.WindowsRuntimeStorageExtensions.d__5.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 archive.DocumentDetail.d__0.MoveNext()} System.Exception {System.UnauthorizedAccessException}
Why is this so?
Thanks

Categories

Resources