Load Test : Exception for access denied for agent pc (LoadTestCounterCategoryNotFoundException) - visual-studio-2010

Exception LoadTestCounterCategoryNotFoundException 1
The performance counter category 'Memory' cannot be accessed on computer 'SHIKHA-PC' (Access is denied) ; check that the category and computer names are correct.
I got this error while running a the load test. The test includes 2 agents one on the controller machine from where I run the test, and second on Shikha pc mentionned above.
I am using: Window Server 2008, VS2010. Load test is running on the controller machine.
How can I fix this error?

essentially what is happening is that when the load test controller is asking for an perfmon category from 'SHIKHA-PC' it is getting a timeout. Either that happens because you do not have the permission to access the perfmon settings on that PC (a mix of required user permissions and making sure the correct port is open), or there are simply to many requests for the PC to respond to in time.
I have in the past had some success by using TypePerf -q -s SHIKA-PC in a command line session. This "warms up" the performance counters.
Call the Typeperf command from a cmd console on the controller.
For Travis Lingenfelder's blog post on this problem see here
Some steps to take:
Make sure the account running the Visual Studio load test on the
controller is a member of the groups "Performance Monitor Users" and "Performance Log Users"
Test the port 139 is open on between the controller and SHIKA-PC by calling "Telnet shika-pc 139" from a cmd prompt on the controller.

To add my answer to this old question as I just solved this myself:
Ensure that you are running the Controller process as the correct user:
Start->Run->services.msc
Right Click Visual Studio Controller, Properties, Log On tab
Ensure correct user and password is entered there

Related

Unable to run a COM application through Jenkins if no user is logged in

I am running a Jenkins server on a Windows 10 computer, as a service. In one of the Jenkins-jobs I have to perform tests using a COM application. The same computer is also used by the developers in their daily work over RDP, and the Jenkins-job in question is run in the night when no regular developer is using it. But if no user is logged in on the computer or using RDP, the script in the job fails to start the COM application with the following message:
The server process could not be started because the configured
identity is incorrect. Check the username and password.
I found that the issue seems to be that the identity for the COM application is taken from the current interactive user, and if there is none, it fails, see
https://support.microsoft.com/en-my/help/305761/com-server-application-that-uses-interactive-user-identity-fails-to-lo
I cant seem to be able to solve my issue. I see two options:
Make sure that a user is logged in when the job is executed
Figure out how to run the COM application without an interactive user
For 1 i see the following solutions and why they do not work:
Autologin on Windows start, and leave logged-in: Will not work since we use the computer in our daily work through RDP, which means that the local logged in user will be kicked out since we are only allowed one session at a time.
Log in using RDP and then exit using the script tscon.exe 0 /dest:console which will leave the session open. Will not work since we are 15 people in the team using that machine over RDP, and people will forgett to use this command when they log of by the end of the day.
For 2, i am unable to find a way to do this.
Can I in Windows schedule a user to automaticall be logged in before the job starts? Can i use a second computer and scedule an RDP-session to the first computer, before the job is executed?
Since nobody was able to provide a good solution I will input my workardound as an answer and possible solution. What I ended up doing was using a second computer (running Windows) and schedule a task on that computer that every night (before the Jenkins-job starts) opens an RDP-session to the computer running Jenkins. This way the Jenkins job, and the COM-application, has an active user that it can use.
This is how I achieved this:
Login to the second computer (i.e. the one not running Jenkins) and open the RDP (Remote Desktop Connection) dialog and click Show Options
Enter the details for the first computer (i.e. the one running Jenkins). Make sure to uncheck Always ask for credentials (you will need to save the credentials to be able to automate this).
Save the configuration to an .rdp-file, using Save As...
IMPORTANT: Press connect to connect to the first computer, enter the password and make sure to save it. Also accept any certificates e.t.c. to prevent future warnings/dialogs.
Create a bat-file containing the following
mstsc C:\Path\To\saved_rdp_file.rdp
Create a task in Windows Sceduler that calls the bat-file created in step 5 every night.
Optional: If you want to close the rdp-session when Jenkins is done, create a second bats-script and scedule that as well, containing:
tasklist /FI "imagename eq mstsc.exe" | find "mstsc.exe" && taskkill /f /im mstsc.exe || echo process "mstsc.exe" is not running

performance counter category 'Process' cannot be accessed on computer- VS load Test

When i run Load test using Vs Load Test i get an exception
The performance counter category 'Process' cannot be accessed on computer;check that the category and computer names are correct. - -
You need to sort out permissions etc to allow the user and computer running the tests to collect the performance counters from the remote machine. The short answer is that if the user running the tests cannot see the counters with Perfmon then Visual Studio will not be able to see them. Hence Perfmon can be used to give confidence that the settings are correct.
To enable collection of performance counters by a Visual Studio load test do the following in each remote computer to be monitored. Perform these steps while logged in to a sufficiently privileged account.
1) Run wf.msc. In the inbound category, enable the Performance Logs & Alerts firewall exception.
2) Run lusrmgr.msc. Add the user to the Performance Log Users, the Performance Monitor Users and the Event Log Readers groups. The user to be added is the user who will be running the tests.
3) Run services.msc. Ensure the Performance Logs & Alerts and the Remote Registry services are set to autorun.
4) Run secpol.msc. Ensure that the Performance Log Users and the Performance Monitor Users groups include the Log on as a Batch User privilege.
5) At a command prompt rebuild all counters on the machine by running lodctr /r. (Have seen this command returning the message Error: Unable to rebuild performance counter setting from system backup store, error code is 5. Have not tracked down the reason but it does not appear to cause any problems.)
These commands are explained in more detail here.

Could not obtain information about Windows NT group / user, error code 0x3a

I am trying to deploy a SQLCLR library to SQL Server 2008 R2. In visual studio I have set up the data connection and it works correctly (I can run queries), but when I try to deploy I get the message "Error: Could not obtain information about Windows NT group / user , error code 0x3a."
This is strange because I have set up the data connection to use SQL server authentication on a different user name.
I receive the same error when I run CREATE ASSEMBLY while logged in to the SQL management studio with the different user name.
To add to the mystery, when I deploy using permission set SAFE everything is fine. However my assembly requires EXTERNAL ACCESS.
What could be the problem with deploying my assembly?
This issue wasted so much time I feel compelled to share the solution so that nobody else falls into the same trap.
Issue was resolved by setting the SQL Server Active Directory Helper service to run on Manual, then rebooting the server.
This issue arose in a different environment for me:
Windows 10 box;
The user Windows complained about was an AZUREAD user;
On my Win10 box there was no SQL Server Active Directory
Helper service, so I couldn't try the original solution posted by
ose.
I was able to work round the issue by removing the AZUREAD user as a SQL Server user while I added the assembly.
In my case that user was not essential to have as a SQL Server user, but I dare say it would be possible to re-add the user back later should this be required.

WMIPRVSE needs to be run under network services by default

I have 2 separate servers (windows server 2008 r2) from where I am running vbs scripts through a microsoft scheduler ( my-computer>manager>Schedule). when I run vbs scripts locally they are working fine, but when it is being run through scheduler one of servers is getting stacked. while the other is working fine. And also I have noticed from task manager that the working server runs the WMIPRVSE.exe though Network Service user and the other one shows SERVICES as user.
How to make sure that WMIPRVSE.exe will always run under Network Services. Thanks
Edit:
I have tried to change the log on user from services, but it failed to start the service than.
There are a few things I have tried, but I don't know which one helped me.
What I did is I granted all permissions to wscript file which is located in system32 somewhere, and after some time it became Network Servies. Again not really sure whether it was because of that change or other thing.

Printing from an application in IIS to a networked printer on server

I have a line of code that I can run locally as part of a service that works perfectly fine.
sReportPath = objCrystalUtils.ExportReportToPDF("Report Name", iReportInfoID)
This code is run as a part of a service, and when I unit test it by feeding it data, it ultimately builds the report and prints it.
When I run the exact same piece of code inside an .ashx from an ajax call. The reports are generated (I can see the pdf files being created on disk) but the printing is not happening.
oRpt.PrintToPrinter(objReport.DefaultAutoPrint, True, 0, 0)
In both scenarios the same code is used to print the report. (objReport.DefaultAutoPrint = 0 in both cases)
My only thought is that the location of the code that is calling this method is in a different spot relative to the location of the bills themselves.
The printer that I'm trying to print to is a network printer intalled on my machine, and I'm running Windows 7 IIS 6.1
Any thoughts?
Edit:
Here is a thought... if I'm running one as a unit test locally and im running the other through a web app that is running via IIS, is there a difference in user id and user access to the default printer?
Edit:
So I added my local ASP, IUSR and SYSTEM users to the printer security and allowed them to print... no dice. So I checked the EVERYONE user and it is set to access and NO users are denied... so I think that kinda kills that line of reasoning.
Edit:
I changed the name of this post since I no longer think that the issue is ajax related since If I try to do the same process in code bebehind from a post back instead of running it from an ajax call i still get the same problem.
Patrick, for me it is a known issue of crystal reports, printing a certain report from a running application via IIS.
I got the same issue before, and upon our search for that issue, we got the following;
Report to be generated, exported, and then to be downloaded to client machine,
so user can print it locally (say, report will be exported as PDf file,
user can use print option of PDF reader).
It's not Crystal Reports or other third party app's problem. It's usually the IIS_IUSER's permission problem because it has no access to any network printers. A possible solution is in Process.Start doesn't work in IIS

Resources