Reputation: 4173
A sitefinity CMS based .net web application is hosted as a web role in azure. The site is working fine as such. Now I've enabled Application Insights in the application but No app insights data is being collected .
This is based on Sitefinity 7.3 version. The app insights assemblies are installed via nuget using "Install-Package Microsoft.ApplicationInsights.Web -Pre" and they were successfully installed. The appropriate modules are added in the web.config and the ApplicationInsights.config file is also added to the solution.
I debugged in emulator and found that the "ApplicationInsightsWebTracking" module is loading fine as well.
As a trial I enabled app insights for a normal asp.net mvc app and found that it is working fine.
any solutions for this would be appreciated.
--edit-- I had added the instrumentation key element with the value from new portal in the applicationInsights.config since nuget install of app insights would not add it automatically.
-- more edit---
1) I have used the correct instrumentation key .
2) while running the app in the local azure emulator in the output window I see this error
A first chance exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.ApplicationInsights.dll WebRequestTrackingModule failed at initialization with exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
=== Pre-bind state information === LOG: DisplayName = System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = file:///D:/src/xyz/Azure/Sitefinity/xyz.Sitefinity/Web/Sitefinity/ LOG: Initial PrivatePath = D:\src\xyz\Azure\Sitefinity\xyz.Property.Sitefinity\Web\Sitefinity\bin Calling assembly : Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. === LOG: This bind starts in default load context. LOG: Using application configuration file: D:\src\xyz\Azure\Sitefinity\xyz.Sitefinity\Web\Sitefinity\web.config LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Redirect found in application configuration file: 1.5.11.0 redirected to 2.6.8.0. LOG: Post-policy reference: System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: The same bind was seen before, and was failed with hr = 0x80070002.
at Microsoft.ApplicationInsights.Extensibility.Implementation.TaskTimer.Start(Func
1 elapsed) at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnoisticsEventThrottlingScheduler.InternalCreateAndStartTimer(Int32 intervalInMilliseconds, Action action) at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnoisticsEventThrottlingScheduler.ScheduleToRunEveryTimeIntervalInMilliseconds(Int32 interval, Action actionToExecute) at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnoisticsEventThrottlingManager
1..ctor(T snapshotContainer, IDiagnoisticsEventThrottlingScheduler scheduler, UInt32 throttlingRecycleIntervalInMinutes) at Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.Initialize(TelemetryConfiguration configuration) at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.InitializeComponent(Object component, TelemetryConfiguration configuration) at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.InitializeComponents(IEnumerable components, TelemetryConfiguration configuration) at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.InitializeComponents(TelemetryConfiguration configuration) at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.Initialize(TelemetryConfiguration configuration) at Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.get_Active() at Microsoft.ApplicationInsights.Extensibility.Web.RequestTracking.WebRequestTrackingModule..ctor() in f:\Builds\629\AppInsights\DC_Core_release_signed\src\Web\Web\Web.Shared.Net\RequestTracking\WebRequestTrackingModule.cs:line 28
But the application continues to run fine though.
3) In the fiddler I could see a call made to dc.services.visualstudio.com which I believe is for app insights.
4) I have not used perfview tool much. I just ran the command u mentioned in the Menu>Collect>run option of the perfview tool
then I ran the application in visual studio in azure emulator.
once the home page loaded up, I stopped the perfview.( just clicked abort in the menu)
I am not sure if it collected the required data. Only the Eventstats tab had some data. posting it here.
Name Count AverageSize StackCount PerfView/PerfViewLog 33 175 0 Windows Kernel/SysConfig/VolumeMapping 9 40 0 PerfView/ProviderEnableParameters 6 132 0 Microsoft-ApplicationInsights-Extensibility-Web/WebOperationTelemetryInitializerLoaded 6 301 0 KernelTraceControl/MetaData/EventInfo 3 743 0 PerfView/CommandLineParameters 3 1006 0 PerfView/ManifestData 3 16041 0 PerfView/StartAndStopTimes 2 8 0 Microsoft-ApplicationInsights-Extensibility-Web/ManifestData 2 43332 0 Microsoft-ApplicationInsights-Core/ManifestData 2 13128 0 PerfView/SessionParameters 2 82 0 PerfView/WaitForIdle 1 0 0 PerfView/Rundown/Start 1 0 0 KernelTraceControl/WinSat/SystemConfig 1 3136 0 KernelTraceControl/WinSat/WinSPR 1 286 0 KernelTraceControl/WinSat/Metrics 1 1491 0 PerfView/Rundown/Stop 1 0 0 Windows Kernel/SysConfig/BuildInfo 1 140 0 PerfView/Tracing/Start 1 0 0 PerfView/KernelEnableParameters 1 8 0 Windows Kernel/SysConfig/SystemPaths 1 64 0 Windows Kernel/SysConfig/UnknownVolume 1 50 0 Microsoft-ApplicationInsights-Extensibility-Web/WebModuleInitializationExceptionEvent 1 7430 0 PerfView/Tracing/Stop 1 0 0 Windows Kernel/EventTrace 1 324 0 Microsoft-ApplicationInsights-Core/LogError 1 6164 0
Upvotes: 0
Views: 559
Reputation: 1900
BCL dependencies were not found , please check that BCL and BCL Async packages were added, and your project references their assemblies, that they copied to your bin folder and copied when you publish.
You can vote for removing these dependencies here: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/6813238-provide-a-net-4-5-version-of-core-microsoft-appli
(BTW I also downloaded trial version of Sitefinity, added Ai and it worked. So I do not think that your problems are Sitefinity specific)
Upvotes: 2