.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Performance Counters to monitor DirectoryServices.AccountManagement and Security.AccessControl activ

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :ASP.Net
 

Hi Everyone,

I'm writing an application that takes in a file name as input, and then extracts its ACLs using FileSecurity.GetAccessRules().  Once I have these ACLs, I go through and identify each group member, obtain a group principal using Principal.FindByIdentity(), and traverse group principals using GroupPrincipal.GetMembers().  Undoubtedly the first call is going to hit the share where the file is located, and the next two calls are going to translate into LDAP queries against the AD server. 

I'm wondering, are there performance counters that I can attach to on the machine where the code runs so that I can monitor how hard I'm hitting each server?  The thing is that I'm not going to be able to attach a counter to the server iteself.  So Ideally, I would want to know how many bytes I'm sending out of this process per second.  I'm currently using category "Process", counter "IO Other Bytes/sec" to monitor activity.  However, this counter doesn't seem to map 1-to-1 from the data that it reports and the data that Perfmon reports on the network share / AD server.  The mapping seems to be more of a 1:5 relationship, so that when the local process reports that it's sending 10,000 bytes/sec, Perfmon reports that it's getting hit with 50,000 byte


View Complete Post


More Related Resource Links

Performance Counters to monitor DirectoryServices.AccountManagement and Security.AccessControl activ

  

Hi Everyone,

I'm writing an application that takes in a file name as input, and then extracts its ACLs using FileSecurity.GetAccessRules().  Once I have these ACLs, I go through and identify each group member, obtain a group principal using Principal.FindByIdentity(), and traverse group principals using GroupPrincipal.GetMembers().  Undoubtedly the first call is going to hit the share where the file is located, and the next two calls are going to translate into LDAP queries against the AD server. 

I'm wondering, are there performance counters that I can attach to on the machine where the code runs so that I can monitor how hard I'm hitting each server?  The thing is that I'm not going to be able to attach a counter to the server iteself.  So Ideally, I would want to know how many bytes I'm sending out of this process per second.  I'm currently using category "Process", counter "IO Other Bytes/sec" to monitor activity.  However, this counter doesn't seem to map 1-to-1 from the data that it reports and the data that Perfmon reports on the network share / AD server.  The mapping seems to be more of a 1:5 relationship, so that when the local process reports that it's sending 10,000 bytes/sec, Perfmon reports that it's getting hit with 50,000 bytes/sec.  Is there a better counter to attach

Performance Monitor Counters To View How "Busy" A SQL Server Is

  
What are some good performance monitor counters to look at, when trying to figure out how "busy" our SQL 2008 server is? We were told to look at: SQLServer: SQL Statistics: Batch Requests/Sec and SQLServer: Databases: Transaction/Sec . Any other critical ones? Is there a counter to get the number of  selects, updates, and deletes independently per second? Thanks.

Wickedly Strange .Net WPF Performance Problem Dissapeers with Windows 7 Performance Monitor Open

  
Hello Everyone, I have been developing one large and complex WPF application for 13 months now, all is going well and especially tonight as I now have some sort of clue or hint to what I have been seing now for quite some time.  Here is the rundown. 1) Running on i5 processor with 4GB RAM and Windows 7 2) The application was developed all in .Net 4.0, WPF C#. 3) It is heavily GUI intensive and also uses Entity Framework Detached for Database Access. 4) Is multi-threaded / multi-tasking. I am a nutcase when it comes to testing.  Since my graphical application heavily depends upon performance and determinsm (please somebody don't start with the C++ vs .Net on here) and has been performing great FOR THE MOST PART.  Every once in a while, I see that the application runs into the weeds for 5 or 6 seconds and the interface is unresponsive.  I have this thing tuned finely too.  Well now toward the end of development I have finally had to face that bug so to speak.  I can force it by clicking spastically on my buttons causing an event storm and making the system update the GUI.  SO!  Great start, I can now cause the problem on a regular basis (for you youngsters that is actually a good thing)!  Alright, so I start with the easiest investigative tool, CNTRL - ALT - DEL into Windows 7 Performance Monitor.  As you can tell from

Performance monitor tools

  
Hi,What is the best tool to continously monitor the performance of the SQL Server, i.e. which queries are the most CPU intensive, which ones are causing most I/O operations etc.. I am not a hardcore DBA and I do not have the time to all the time search for information about which queries are causing the DB-server to run on a very high load. What I would like is to get a report with information about e.g. these are the queries that you should optimize etc..I would really appreciate some recommendations on the best way to continously get information about what is causing the high load on the servers and what can be done to improve the performance.Thanks in advance!Best regardsLars

System.DirectoryServices.AccountManagement: FileNotFound exception while creating PrincipalContext o

  
Hi, I want to create a local group for my Netapp server. And also add a domain user under this group. Using .NET namepaces System.DirectoryServices.AccountManagement, I can achive this for Windows server. But if the same code is tried on NetApp, following exception is thrown: Unhandled Exception: System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)   at System.DirectoryServices.Interop.UnsafeNativeMethods.IAds.GetInfo()   at System.DirectoryServices.DirectoryEntry.RefreshCache()   at System.DirectoryServices.AccountManagement.PrincipalContext.DoMachineInit()   at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()   at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()    at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)   at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue)   at System.DirectoryServices.AccountManagement.GroupPrincipal.FindByIdentity(PrincipalContext context, String identityValue)   at AddGroup.Program.Main(String[] args) Does S

.NET 1.1 Process.ProcessName and performance counters

  

Our customer has a HTTP Remoting endpoint with a framework method that attempts to find out the name of the current running process. In calling System.Diagnostics.Process.ProcessName it intermittently gets into this error condition in some of their Windows 2003 servers.

 

Error Message :

System.InvalidOperationException: Couldn't get process information from remote machine. ---> System.ComponentModel.Win32Exception: Access is denied

at System.Diagnostics.PerformanceMonitor.GetData(String item)

at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item)

How to Enable WF 4 Performance Counters

  

I'm having difficulty enabling the performance counters for WF 4.  We are using a WorkflowServiceHost if it's relevant.  

We start up the host (windows service) that contains the WorkflowServiceHost and after this has completed and the host has started a workflow instance, in PerfMon we are unable to select the WF 4 related counters.    What we see in PerfMon is in the "Add Counters" dialog, we see the performance objects of "Windows Workflow Foundation" (believed to be related to .Net 3.x version of WF) and "WF (System.Workflow) 4.0.0.0".  We select WF (System.Workflow) 4.0.0.0 and see the counters but no instances are ever associated with the counters.  


inequality search with System.DirectoryServices.AccountManagement.PrincipalSearcher?

  

The System.DirectoryServices.AccountManagement are a great time-saver when working with Active Directory!  But now I'm stuck.

Is it possible to use inequality searches with PrincipalSearcher?  For instance, i have users with three types:

Glubflabs
Abadabs
Foos

and possibly more.  I want only non-Foo users.  With PrincipalSearcher's underlying DirectorySearcher, i could give it a string filter like this:

filter.Append("(&(objectCategory=Person)(objectClass=user)(sAMAccountName=*)(!description=Foo))");

With PrincipalSearcher, that inequality doesn't seem to be possible!  I've searched all through MSDN articles and haven't found anything that covers this.

Any help is appreciated!


SQL performance monitor error

  

I am runninng Alert monitor on SQL 2005 server and got this error:

Windows cannot load extensible counter DLL MSSQLServerOLAPService, the first DWORD in data section is the Windows error code.

Event ID 1023, source Perflib, Type: error

 

Tried to follow MS article, but it did not fix a problem.

 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp

.

iis 7 IP Security using System.DirectoryServices : Unable to update

  

I used the below code to Set  IP Security from my vb.net Application.  It is working in IIS 6 (windows xp, and server 2003).

facing error in IIS 7.5 (windows7).

' Get the IIS object that holds the info for the default site.

 

Dim SecObj As Object = GetObject("IIS://LocalHost/W3SVC/1/Root/WebServerSCM")

 

' Get the IIsIPSecurity object.

What are the required Security permissions to call SAM accountmanagement over the wire, using System

  

Hi,

I need to perform remote management on the local SAM database.  I am getting a security permission error, but can't figure out what the required permissions need to be.  My test harness works great as a locally authenticated user however the permission issue gets thrown when I am trying to connect to a remote host that isn't part of the domain.

The exception is getting thrown on the call to ValidateCredentials, which is found in the constructor for the LocalAccount class below, specifically you will see it  public LocalAccount(string Server, string User, string Password)

My test environment includes windows 7 machines that are working in a offline mode trying to connect to machines running XP, 2003 and Windows 7 that are not part of the domain.

Any and all help would be appreciated.

Thanks
       

using System;
using System.Collections.Generic;
using System.DirectoryServices;
using System.DirectoryServices.AccountManagement;


namespace WindowsManagement
{
  class Program
  {
    static 

Error: 29528 -performance counters issue

  

Summary
=============================
you may get the following error while trying to install hotfix:

On setup log:
==============================================
Error Number : 29528
Error Description : MSP Error: 29528 The setup has encountered an
unexpected error while Installing performance counters.
 The error is: The configuration registry key is invalid.

Resolution:
==============
Check this key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Performance\Disable Performance Counters

It should be 0.

Open a command prompt window.
At the command prompt, type cd %Systemroot%\System32, and then press ENTER.

At the command prompt, type the following line, and then press ENTER:

unlodctr.exe MSSQLServer
lodctr.exe <SQL Server path>\binn\sqlctr.ini


Microsoft Online Community Support

Performance counters for NOLOCK

  

Hi,

Recently we added NOLOCK for all the queries, how do we check the performance improvement in sql server after NOLOCK is implemented.

What perfmon counter need to be checked in this case

 

thanks


Mikha

Creating a ContactPrincipal (DirectoryServices.AccountManagement)

  

Greetings,

I am attempting (failing miserably, and hopefully it's all my fault and someone will have good news) to create a class that represents an Active Directory Contact object.  This is added to the Active Directory schema after you install Exchange.

I started by inheriting from System.DirectoryServices.AccountManagement.Principal, just like all the other Principals do (at least at their core, though User/Computer principals use an intermediary class called AuthenticablePrinciple).  But it seems like Microsoft does not want you actually making your own Principals for AD... This becomes obvious very quickly when you try to actually do anything with this inheritance... For instance, there is no way to store the PrincipalContext object inside the newly created ContactPrincipal since MyBase.Context is readonly, ContextRaw is a protected friend, and the actual storage value, ctx, is private...  So even when I use reflector to see how they store the context, in say GroupPrincipal, I find I can't duplicate this process as all the variables are inaccessible...

The next thing I tried was inheriting from UserPrincipal, even though in Active Directory the Contact object type is not a user, though it does share many other types with user.  I applied the DirectoryObjectClass attribute (with a value of "contact"),

How to Monitor or Evaluate the Performance of .NET Application ?

  
Please let me know the ways to monitor the performance(Memory and CPU Usage) of .Net Windows service application?
Ganesh Chellam Bangalore

SharePoint Tutorial - Security

  
Security in SharePoint is comprised of users, groups and roles.



Users, Groups and Roles

Users
A user account comes from the authentication system. For example, if Active Directory is used to authenticate then the user accounts will come from it.

Groups
There are two types of groups SharePoint uses: domain groups and SharePoint groups.

ASP.NET Best Practices for High Performance Applications

  
This article lists the techniques that you can use to maximize the performance of your ASP.NET applications. It provides common issues, design guidelines, and coding tips to build optimal and robust solutions.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend