Fixing Performance Counters

I use the Process-Explorer from Sysinternals (now part of Microsoft) to watch my running processes. Some day I noticed that .Net processes are not highlighted anymore, like they were before.

So doing some google-research I came across a post at the systinternals forum. I figured that I was missing all of my performance-counters, that was the reason why .Net processes where not highlighted anymore. Looking at the performance-monitor also revealed, that all performance-counters where just “numbers” and had no measures associated with them.

So I followed the steps descriped in the knowlegde-base article 300956. Although this article states it’s for Windows 2000 only, this did work with my german version of Windows XP SP2 as well.

After fullfilling the steps of the article I also re-registered the performance-counters of .Net 1.1 as well as .Net 2.0 by loading the counters from the *.ini files from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 and C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727.

After restarting process-explorer my .Net processes showed up highlight like they did before.

Open the Gate!

The .Net Framework offers capabilities to secure application in a way, that a trust-relationship is being established.

Most well known effect of this security features is, that applications will most likely not run from a network share. The reason for this is the code access security, which is being defined in a central XML-configuration file. Default setting is, that local code has full trust, while net-shares (treated as local intranet) has reduced rights and capabilities.

While the .Net Runtime 1.1 had a wizard so modify these settings only the .Net 2.0 SDK has this feature.

So if you’re in the need to modify code access security on a workstation, which only has the .Net Runtime installed you have to use caspol.exe. This is a command-line utility to modify the security settings for the .Net Framework.

For example, to modify the security settings for a folder test on drive z: you need to call:

caspol -m -ag 1.2 -url file://z:/test/* FullTrust

Parameter::

  • -m = machine level (affects to complete machine)
  • -ag = (add (Code)-Group) 1.2 => parent CodeGroup (equivalent “All_Code” -> “Local Intranet”)
  • -url = membership condition “url” (the path has to follow URL notation)

Links:

Reporting Services accessed via URL

Well, a neat feature of MS Reporting Services (SSRS) is, that the reports can be called via a URL directly. This offers the option to “deep-link” into a report and preset all needed parameters.

You just simply need to browse to you reportserver http://[servername]/ReportServer/. From here on you can click right to your desired report. Then just add the needed parameters to the URL. There parameters are passed as key/value-pairs, so you need to know the ids of the parameters, as they are defined in the report parameters.

To call a report test.rs with the parameter customer_id and a value of 1234 you just call the URL http://myreportserver/ReportServer/Pages/ReportViewer.aspx?/test.rs&customer_id=1234. A little more difficult at first glancy might be multi-line parameters. Just add the parameter as many times as you wish. For example to call the above report, but having customer_id declared as a multi-line parameter and thus wanting to pass the values 1234 and 5678 just call [...]ReportViewer.aspx?/test.rs&customer_id=1234&customer_id=5678.