I have 2 SQL Azure DB's (V12) within a single server and wants the transaction to be atomic. Trying to do what is mentioned here.
I get below exception while trying to wrap the transactions in a single transaction scope. The project targets .net version 4.6.
What am I missing here?
Error message (in case image doesn't appear on your end): "The service has encountered an error processing your request. Please try again. Error code 8510.
A severe error occurred on the current command. The results, if any, should be discarded."
Thanks!
Can you check that you are running with .NET 4.6.1? You need 4.6.1 or later and the exceptions looks like you are running on an earlier .NET version than that.
Thanks,
Torsten
Related
I have started getting an error in ApplicationInsights on 8/26/2022 #3am EDT. Our code hasn't change and has been running for a month without issue. This error has started out of nowhere.
AI (Internal): [Redfield-Microsoft-ApplicationInsights-Extensibility-Web] TelemetryInitializer Microsoft.ApplicationInsights.Web.SyntheticUserAgentTelemetryInitializer failed to initialize telemetry item System.MissingMethodException: Method not found: 'Boolean Microsoft.AspNet.TelemetryCorrelation.ActivityExtensions.Extract(System.Diagnostics.Activity, System.Collections.Specialized.NameValueCollection)'.
at Microsoft.ApplicationInsights.Web.Implementation.RequestTrackingExtensions.CreateRequestTelemetryPrivate(HttpContext platformContext)
at Microsoft.ApplicationInsights.Web.Implementation.RequestTrackingExtensions.ReadOrCreateRequestTelemetryPrivate(HttpContext platformContext)
at Microsoft.ApplicationInsights.Web.Implementation.WebTelemetryInitializerBase.Initialize(ITelemetry telemetry)
When I try to search for help on this, I cannot find anything because Application Insights is used to help people find errors and exceptions... so when I try to get help, it provides help on how to use Application Insights data instead of providing information on what to do when Application Insights is reporting it's own error.
I am at a loss here, I don't know how to progress further to understand why this issue just started happening and what I can do to resolve it. It would appear as if this issue is causing our Azure CPU usage to fly out of control and is causing the entire site to lag.
Application is written in VB.NET using v4.6.2.
To circumvent the issue, we have turned off Application Insights. I was 1 version back, so it's possible there was an issue that was corrected and this will go away when the new version goes live (with the updated reference).
I am developing an app for Hololens2 with Unity, Mixed Reality Toolkit and Azure Remote Rendering. Something with ARR (probably a misconfiguration) produces a deploy-time error:
*** Assertion ***
Expression: "hybridPlayer"
Function: "RemotingXrLayerXrCreateApiLayerInstance"
File: "D:\a\_work\1\s\src\libstreamer\hybrid\HybridPlayerOpenXrLayer.cpp"
Line: 1480
Message: "Hybrid player not valid."
Unhandled exception at 0x00007FFAF0BFACC4 (Microsoft.Holographic.HybridRemoting.dll) in hololens-<redacted>-unity.exe: 0xC0000602:
Does anyone have any idea where this could come from? My rendering pipeline is set to HybridRenderingPipeline, and my MRTK profile to ARRMixedRealityToolkitConfigurationProfile.
I will happily provide more information. It's just that at the moment I don't know what information is relevant to the problem.
Thank you!
This is a regression in the latest Azure Remote Rendering SDK. Please go back to Version 1.0.41 for now. This should be fixed with the next release.
Our application is using azure application insights. What I read is that, using application insights end to end tracking, we can even get the query which gets executed at database and how much time that query took.
But as shown in the screenshot, azure app insights shows me that there are 3 calls made to database but not the actual query that was executed against the database in those calls.
What I need to know is that what i need to do inorder to get the query that was executed against the database?
This is one of breaking changes as part of SDK 2.14.
You just need to simply modify ConfigureServices() with the line below for ASP.NET Core:
services.ConfigureTelemetryModule<DependencyTrackingTelemetryModule>((module, o) => { module.EnableSqlCommandTextInstrumentation = true; });
and for ASP.NET modify ApplicationInsights.config file:
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector">,
<EnableSqlCommandTextInstrumentation>true</EnableSqlCommandTextInstrumentation>
</Add>
Yes, the application insights can track sql query. But note that there are some changes in the latest version of application insights nuget package, which makes it does not automatically track sql query.
You can do it via the workaround below.
Assume you're using the .net core web project. Then you need to downgrade the Microsoft.ApplicationInsights.AspNetCore to version 2.12.0.
Here is my test result with version 2.12.0 of that package:
And also, you can use other workarounds, see here for more details.
Basically what I need is to to call DbContext.SaveChanges a few times and at the end, commit the transaction or rollback.
It is an MVC application based on .NET 4.5 and EF 5 hosted on Windows Azure.
-- EDITED --
I found out TransactionScope works well in Windows Azure as long as you only have a single connection (lightweight transaction).
The exception I was getting was due to the fact that I was using DbContext and A Membership Provider inside the same transaction.
I started a new post with more details and code here.
You should look at using a TransactionScope:
TransactionScope Class
Simple way of using transactions in ADO.NET Entity framework
I've been experimenting with the new windows azure website feature, and im getting http 500 internal server errors, but the logs are giving me very generic messages, I "think" its a problem with database connections, as everything runs fine locally. Is there some way to get more usefull error messages from azure ?
Im using C# .net 4.0 and mvc 3
Can you adjust the custom errors section in the web.config to give you detailed errors all the time?