Reputation: 773
Is it possible to access CPU, RAM and ASP.NET requests performance counter from web app via some API?
When I call it using System.Diagnostics.PerformanceCounter.NextValue
method I get exception:
Access to the registry key 'Global' is denied.
I have seen examples with Web Roles, but nothing about websites.
Upvotes: 2
Views: 1588
Reputation: 1
It's related to permission issue here is the solution for that. Step 1: Just add an app.manifest file into particular solution step 2: add the following tag into manifest file.
< requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Step 3: Finish.
Upvotes: 0
Reputation: 1409
According to this Microsoft Article it is not supported on Azure Websites:
Windows Performance counter collection isn’t supported on an Azure WebSite
You can however monitor the CPU usuage and Memory Working set using the Monitor tab in the old management portal or directly on the website "blade" using the new portal. Maybe you can get these data out programatically using Microsoft.WindowsAzure.Management.WebSites
Upvotes: 2