I installed x64 version of AppMon agent version 22.214.171.1245 to profile web application built using 4.0. I as well created a new entry by selecting a process w3wp and also gave AppMon server/collector IP address and port. After this I made "Inactive" and "Active" and also did iisreset but all in vain. I as well did server restart but still see following error - "Bootstarp agent (dtagent.dll) is not loaded, but has been activated. Process restart or system reboot is required".
P.S. Application pool points to Target Framework version "v4.0" and managed pipeline mode is "Integrated".
Solved! Go to Solution.
I have read the documentation-
Also, in server using process explorer I can see many dtagent.dll loaded for the process w3wp where as I didn't see dtagentcore.dll loaded.
Things to check:
For your 1 point- I have attached screen shot of process explorer showing dtagent.dll. I couldn't see dtagentcore.dll in process explorer meaning it never loaded.
For second point-
For third point- In Event Viewer I saw, but I had no luck there.
Right, but your screenshot did not reveal if the names of the apppools. Not sure if "EmpoyeeSupport" was among them.
You checked environment variables in the System Configuration. That does not necessarily mean that they are set for your w3wp.exe. Please re-check with Process Explorer.
Background: In Windows, environment variables are inherited from parent processes to child processes. Adding/changing a system-wide does not have any effect on running processes. The exception to that rule are a few special processes (e.g. "explorer.exe", "services.exe"). They magically adopt changed environment. From that point on, any newly created process (child of "services.exe") inherits the environment variables. That is the reason why a simple IIS-Restart often does not do the trick. One needs to also kill "svchost.exe" (which is a child process of "services.exe"). That's why a system-reboot is often the most secure choice to get environment variables deployed everywhere.
However, there might be another pitfall: IIS might set certain env-variables per application pool itself, overriding system-env-vars.
That is why it is important to check the actual env-variables for the running process via Process Explorer. Same goes for loaded DLL's. It's best to use the lower-pane view for Loaded Modules in Process Explorer.
Yes, it was employeesupport. The PID must make this clear.
the loaded dtagent.dll does not show the PID 5756.
For Environment Variable I did this
Followed by clicking on "Show Environment Variable"
What exactly is the problem, are the agents not showing up in the server?
If so, does it look fine in the .NET Agent configuration tool? Could you maybe add a screenshot of the tool? You can check if there are any agent logs.
As it turned out, the reason for this was: w3wp.exe was already started, but the CLR was not initialized yet. In this case, the agent is not yet loaded altough the process is started.
In such a case, w3wp.exe usually just uses ~10MB of memory, and has no mscorlib.dll loaded! This happens when IIS is configured to pre-warm processes, without actually initializing the CLR yet. As soon as the application pool gets hit with a request, the CLR gets in initialized and the agent gets loaded properly.