Exception at launch for Microsoft.ApplicationInsights.SnapshotCollector - c#

I am using Microsoft.ApplicationInsights.SnapshotCollector in my .NET 4.6.2 WPF app but when I start my app, I have a Win32Exception coming from SnapshotCollector which tells me a file is missing.
Here is the Stacktrace:
à System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
à System.Diagnostics.Process.Start()
à System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
à Microsoft.ApplicationInsights.SnapshotCollector.Uploader.Start(Guid datacube, String endpoint, IWorkingFolders workingFolders)
à Microsoft.ApplicationInsights.SnapshotCollector.Uploader.<>c__DisplayClass0_0.<StartAsync>b__0()
à System.Threading.Tasks.Task.InnerInvoke()
à System.Threading.Tasks.Task.Execute()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à Microsoft.ApplicationInsights.SnapshotCollector.StampFrontEnd.<GetStampIdAsync>d__6.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à Microsoft.ApplicationInsights.SnapshotCollector.ServiceProfilerClient.<ConnectToStampAsync>d__7.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à Microsoft.ApplicationInsights.SnapshotCollector.SnapshotCollectorTelemetryProcessor.<ConnectAsync>d__52.MoveNext()
The app then continues to launch and works fine but I don't think SnapshotCollector is working.
I used this to configure SnapshotCollector for my "other .NET applications" section.
Did I miss something?

Ok, I figured it out.
By default, NuGet package Microsoft.ApplicationInsights.SnapshotCollector installs its files in the SnapshotCollectorFiles folder inside bin/x86/Debug, but these files need to be in the same root folder than the executable app.

Related

Analyzers error in Visual Studio 2022 Preview

The Release version of Visual Studio works with C# 11, but the required keyword isn’t even recognized as such, which I wanted to try out. So I installed the Preview version of Visual Studio 2022 (Preview 5.0, upadted to 6.0 today).
When starting VS 2022 Preview, I get a lot of errors in analyzers and similar features (see image below). Their stack traces (also below) are all telling essentially the same story: The method ImmutableArray is cannot be found.
Clicking on “Enable”, the error re-appears after a few seconds.
Looking it up, I added the NuGet package ImmutableArray to the soulution. That seemed like an odd thing to have do, but if it had worked, I’d have been fine with it.
Both a fresh C# console application project and an existing project (one that perfectly works in the latest Release version of VS 2022) crash the analyzers.
Closing and re-opening VS did not help.
Restarting the PC did not help.
Using the “Repair” option in Visual Studio Installer did not help.
Manually uninstalling and re-installing the Preview version (not yet tried with 6.0) did not help.
It seems nobody but me has encountered this. I suspect that there’s something missing in the installation. Below is a screenshot of the installed components.
Stitched-together screenshot of the errors:
The stack trace of the first:
(Note: Methode nicht gefunden is German for Method not found. My Visual Studio UI is switched to English, but some German slips through for some reason. I did not alter the other strack trace where it is English.)
StreamJsonRpc.RemoteInvocationException: Methode nicht gefunden: "System.Collections.Immutable.ImmutableArray`1<Microsoft.Cci.ICustomModifier> Microsoft.Cci.IFieldReference.get_RefCustomModifiers()".
at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__143`1.MoveNext()
--- 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 Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<TryInvokeAsync>d__18`1.MoveNext()
RPC server exception:
System.MissingMethodException: Methode nicht gefunden: "System.Collections.Immutable.ImmutableArray`1<Microsoft.Cci.ICustomModifier> Microsoft.Cci.IFieldReference.get_RefCustomModifiers()".
bei Microsoft.CodeAnalysis.CSharp.CSharpCompilation..ctor(String assemblyName, CSharpCompilationOptions options, ImmutableArray`1 references, CSharpCompilation previousSubmission, Type submissionReturnType, Type hostObjectType, Boolean isSubmission, ReferenceManager referenceManager, Boolean reuseReferenceManager, SyntaxAndDeclarationManager syntaxAndDeclarations, IReadOnlyDictionary`2 features, SemanticModelProvider semanticModelProvider, AsyncQueue`1 eventQueue)
bei Microsoft.CodeAnalysis.CSharp.CSharpCompilation.Create(String assemblyName, CSharpCompilationOptions options, IEnumerable`1 syntaxTrees, IEnumerable`1 references, CSharpCompilation previousSubmission, Type returnType, Type hostObjectType, Boolean isSubmission)
bei Microsoft.CodeAnalysis.CSharp.CSharpCompilationFactoryService.Microsoft.CodeAnalysis.Host.ICompilationFactoryService.CreateCompilation(String assemblyName, CompilationOptions options)
bei Microsoft.CodeAnalysis.SolutionState.CompilationTracker.<BuildDeclarationCompilationFromScratchAsync>d__34.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.SolutionState.CompilationTracker.<BuildCompilationInfoFromScratchAsync>d__33.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.SolutionState.CompilationTracker.<BuildCompilationInfoAsync>d__32.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.SolutionState.CompilationTracker.<GetOrBuildCompilationInfoAsync>d__31.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.SolutionState.CompilationTracker.<GetCompilationSlowAsync>d__29.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.Document.<GetSemanticModelAsync>d__23.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.Shared.Extensions.DocumentExtensions.<GetRequiredSemanticModelAsync>d__7.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.DocumentHighlighting.AbstractDocumentHighlightsService.<GetDocumentHighlightsInCurrentProcessAsync>d__2.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.DocumentHighlighting.AbstractDocumentHighlightsService.<GetDocumentHighlightsAsync>d__1.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.Remote.RemoteDocumentHighlightsService.<>c__DisplayClass2_0.<<GetDocumentHighlightsAsync>b__0>d.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass10_0`1.<<RunWithSolutionAsync>g__TryFastGetSolutionAndRunAsync|0>d.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<RunWithSolutionAsync>d__10`1.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.<RunWithSolutionAsync>d__11`1.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.CodeAnalysis.Remote.BrokeredServiceBase.<RunServiceImplAsync>d__14`1.MoveNext()
Of the third:
System.MissingMethodException : Method not found: 'System.Collections.Immutable.ImmutableArray`1<Microsoft.Cci.ICustomModifier> Microsoft.Cci.IFieldReference.get_RefCustomModifiers()'.
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation..ctor(String assemblyName,CSharpCompilationOptions options,ImmutableArray`1 references,CSharpCompilation previousSubmission,Type submissionReturnType,Type hostObjectType,Boolean isSubmission,ReferenceManager referenceManager,Boolean reuseReferenceManager,SyntaxAndDeclarationManager syntaxAndDeclarations,IReadOnlyDictionary`2 features,SemanticModelProvider semanticModelProvider,AsyncQueue`1 eventQueue)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.Create(String assemblyName,CSharpCompilationOptions options,IEnumerable`1 syntaxTrees,IEnumerable`1 references,CSharpCompilation previousSubmission,Type returnType,Type hostObjectType,Boolean isSubmission)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilationFactoryService.Microsoft.CodeAnalysis.Host.ICompilationFactoryService.CreateCompilation(String assemblyName,CompilationOptions options)
at async Microsoft.CodeAnalysis.SolutionState.CompilationTracker.BuildDeclarationCompilationFromScratchAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.SolutionState.CompilationTracker.BuildCompilationInfoFromScratchAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.SolutionState.CompilationTracker.BuildCompilationInfoAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.SolutionState.CompilationTracker.GetOrBuildCompilationInfoAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.SolutionState.CompilationTracker.GetCompilationSlowAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Document.GetSemanticModelAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.SemanticDocument.CreateAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.IntroduceVariable.AbstractIntroduceVariableService`6.IntroduceVariableAsync[TService,TExpressionSyntax,TTypeSyntax,TTypeDeclarationSyntax,TQueryExpressionSyntax,TNameSyntax](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.IntroduceVariable.IntroduceVariableCodeRefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
Installation Details (sorry for German, I don’t know how to change it):
I (seem to) have the latest SDK installed (Win+R, “cmd”, Enter):
C:\Users\user>dotnet --version
7.0.100-preview.6.22352.1
Edit: After updating the release version of Visual Studio 2022 to 17.3.1, I have the problems in the release version. On the other hand, the 17.4 Preview seems to have the issue solved.

Use MassTransit for Azure Service Bus with a 'send' shared access policy [duplicate]

I spent some days testing MassTransit 3.1.2 to see if we can use it with Azure Service Bus in our applications.
I made a sample with two console applications using MassTransit.AzureServiceBus (3.1.2) : one publisher and one suscriber.
It works well. When I start the applications, the entities (queues, topic, subscriptions) are created automatically on my namespace on Azure.
That's nice when you are testing thing but in production, I don't want the application to be allowed to create entities. We want to create them upfront.
To try that, I thought It was a good idea to connect to the bus using SAS policy with "Send" or "Listen" permissions only (before I was using a namespace policy with "Manage" permission).
Now I'm struggling on this point, I can't get it to work, I'm always getting 401 errors Manage claim is required for this operation if I don't use a policy with "Manage" permissions.
I tried setting the policy on the namespace or the entities directly without success.
After that I analyzed the stack trace exception (useless part omitted with [...]) :
System.UnauthorizedAccessException: Le serveur distant a retourné une erreur : (401) Non autorisé. Manage claim is required for this operation. TrackingId:2ca420e3-aac6-467c-bacb-6e051dbc3e39_G47,TimeStamp:1/29/2016 11:20:41 PM ---> System.Net.WebException: Le serveur distant a retourné une erreur : (401) Non autorisé.
à System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
à Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult`1.<GetAsyncSteps>b__3c(GetAsyncResult`1 thisPtr, IAsyncResult r)
à Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
--- Fin de la trace de la pile d'exception interne ---
Server stack trace:
Exception rethrown at [0]:
à Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
à Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
à Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
à Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.EndGet[TEntityDescription](IAsyncResult asyncResult, String[]& resourceNames)
à Microsoft.ServiceBus.NamespaceManager.EndGetQueue(IAsyncResult result)
à System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
[...]
à MassTransit.AzureServiceBusTransport.NamespaceManagerExtensions.<CreateQueueSafeAsync>d__1.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
[...]
à MassTransit.AzureServiceBusTransport.Pipeline.PrepareReceiveQueueFilter.<Send>d__5.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
[...]
à MassTransit.AzureServiceBusTransport.ServiceBusReceiveTransport.<>c__DisplayClass12_0.<<Receiver>b__0>d.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
[...]
à MassTransit.Internals.Extensions.TaskExtensions.<WithCancellation>d__0`1.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception
[...]
à MassTransit.MassTransitBus.<StartAsync>d__30.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
à MassTransit.MassTransitBus.<StartAsync>d__30.MoveNext()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
à System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
à System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
à System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
à MassTransit.Util.TaskUtil.Await[T](Func`1 taskFactory, CancellationToken cancellationToken)
à MassTransit.MassTransitBus.MassTransit.IBusControl.Start()
I found out that the line with MassTransit.AzureServiceBusTransport.NamespaceManagerExtensions.CreateQueueSafeAsync to be really interesting because I was able to look at the MassTransit source code to see what it was doing. I saw that it was doing some calls using the NamespaceManager to get the queue or topic.
Since this class is named NamespaceManager, I thought that would mean you need "Manage" permission anyway.
To try that, I made a basic console application using only the Azure SDK to make some calls to the NamespaceManager using a policy with only Listen or Send permissions : I got 401 errors on all the calls I tried. Adding Manage permission worked.
I didn't find anything about this assumption in the Azure documentation or maybe I missed something.
Final question :
Is there a way to use MassTransit on Azure Service Bus with a Send or Listen policy only ? Did I miss something and I'm heading the wrong way ?
Because MassTransit is responsible for managing the topology of the service bus namespace, including creating topics and queues as well as creating and binding subscriptions, the manage permission is required.
While you might think it's a great idea to create everything in production manually and leave that permission off your application, you will always spend time figuring out why things are broken in production and frustrate your engineers. I speak from experience on this one -- it's why we require the permission.
There are also auto-delete queues created for bus management, which again requires the manage permission.
UPDATE: Manage is still required, however, you might be able to get around it. If you can create topics, queues, and subscriptions in advance, and you configure MassTransit to not create topics, queues, or subscriptions, and probably to not publish faults (unless you're going to create those topics as well), and not use error or skipped queues.
For example, this configuration would basically limit the use of MassTransit to a queue only:
var bus = Bus.Factory.CreateUsingAzureServiceBus(cfg =>
{
cfg.Host(...);
cfg.ReceiveEndpoint("existing-queue", e =>
{
e.PublishFaults = false;
e.ConfigureConsumeTopology = false;
e.ConfigureDeadLetterQueueErrorTransport();
e.ConfigureDeadLetterQueueDeadLetterTransport();
e.Consumer(...);
});
});
Messages sent to the queue directly (destinationAddress of queue:existing-queue) would be consumed by the receive endpoint, and error/skipped messages would be moved to the Azure dead-letter queue. You could only call publish if the topic name matching the message type exists (or you could use topic:existing-topic-name as the destination address).

Can't deploy to FTP with port 22 in Visual Studio

I am trying to publish a project in Visual Studio 2019, pointing to port 22 (since I will use a linux environment later)
I followed the steps of:
https://es.stackoverflow.com/questions/239559/error-al-compilar-proyecto-aspx-en-visual-studio and
https://www.a2hosting.com/kb/a2-hosting-products/windows-hosting/publish-a-site-from-visual-studio-using-ftps
So to summarize:
start in administrator mode
enable the FTP and IIS options
I put in front of my URL both ftps and 990
I ping the IP and it is active and without problems
but I still get the same error that I can't connect to the server
Attached the error log
11/12/2020 13:36:22
System.AggregateException: Se han producido uno o varios errores. ---> System.Exception: Error de compilación. Compruebe la ventana de salida para obtener más detalles.
--- Fin del seguimiento de la pila de la excepción interna ---
en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
en Microsoft.WebTools.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.<PublishAsync>b__3()
en System.Threading.Tasks.Task`1.InnerInvoke()
en System.Threading.Tasks.Task.Execute()
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
en Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__213.MoveNext()
---> (Nº de excepción interna 0) System.Exception: Error de compilación. Compruebe la ventana de salida para obtener más detalles.<---
System.Exception: Error de compilación. Compruebe la ventana de salida para obtener más detalles.
Port 22 is SFTP, not FTP(S). The FTPS and SFTP are two completely different protocols. You cannot use the FTP protocol to connect to an SFTP server.
I believe that Visual Studio does not support the SFTP.
See Visual Studio Publish Website Using SCP/SFTP

Error in Xamarin.Forms Release with Lottie/CacheStrategy

I am getting an error, when I try to deploy my android apk xamarin forms or when I compile release. it has to do with the library lottie cachestrategy
error follows.
Mono.Linker.MarkException: Error processing method: 'System.Void >XF.Material.Droid.Renderers.MaterialCircularLoadingViewRenderer::OnElementChanged>(Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1)' in assembly: 'XF.Material.Droid.dll' ---> >Mono.Cecil.ResolutionException: Failed to resolve Com.Airbnb.Lottie.LottieAnimationView/CacheStrategy >Com.Airbnb.Lottie.LottieAnimationView/CacheStrategy::get_Strong()
en Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
en Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
en Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
en Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
en Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
en Mono.Linker.Steps.MarkStep.ProcessQueue()
--- Fin del seguimiento de la pila de la excepción interna ---
en Mono.Linker.Steps.MarkStep.ProcessQueue()
en Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
en Mono.Linker.Steps.MarkStep.Process()
en MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
en Mono.Linker.Pipeline.Process(LinkContext context)
en MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
en Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
en Xamarin.Android.Tasks.LinkAssemblies.Execute()
en Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
en Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() Amis.Reportes.Android
and option Linking is "Link SDK assemblies only"

Unable to modify server by programming since SQL Server 2014

I have a c# program which connects to a server SQL to create a data base.
everything was working with Microsoft SQL Server 2008 but with Microsoft SQL Server 2014 i am facing some issues.
My code is :
Server server = new Server(new ServerConnection(instanceName));
server.ConnectionContext.LoginSecure = true;
server.ConnectionContext.Connect();
server.Settings.LoginMode = mode;
server.Alter();
And the Alter command throw the exception : "Fail to modify for server"
I have tried this https://support.microsoft.com/en-us/kb/956013 but it doesn't work.
EDIT1:
Exception (sorry I use french version of Visual) :
Message : Échec de Modifier pour Serveur « .\SQLEXPRESS ».
=> Fail to Modify for Server « .\SQLEXPRESS »
GetType() : Microsoft.SqlServer.Management.Smo.FailedOperationException
StackTrace : à Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImpl()
InnerException : Microsoft.SqlServer.Management.Common.ExecutionFailureException: Une exception s'est produite lors de l'exécution d'une instruction ou d'un lot Transact-SQL. ---> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'xp_instance_regwrite', database 'mssqlsystemresource', schema 'sys'.
à Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
à Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
--- Fin de la trace de la pile d'exception interne ---
à Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
à Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
à Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
à Microsoft.SqlServer.Management.Smo.SqlSmoObject.ExecuteNonQuery(StringCollection queries, Boolean includeDbContext)
à Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImplFinish(StringCollection alterQuery, ScriptingPreferences sp)
à Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImplWorker()
à Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImpl()
Data : System.Collections.ListDictionaryInternal
Source : Microsoft.SqlServer.Smo

Categories

Resources