Unable to attach to IIS process
I have installed dotMemory 2018.3.4 on a Windows Server 2016 datacenter computer.
I'm trying to attach to the w3wp process.
The application says "Preparing the profiler..." for a minute or two and then eventually gives the error message:
Unable to start profiling
The system cannot find the file specified.
Any ideas on why I can't profile an IIS app on this machine?
Please sign in to leave a comment.
Hi Mark,
This error can occur if w3wp process does not contain running managed code.
What application (.NET Framework or .NET Core) do you run on IIS?
The process did contain managed code. I found that if I had the browser request a web page, then the profiler would finally load. I had loaded web pages before trying to attach, so I know the managed code had already been loaded, but for some reason I also needed to request a web page after starting the attach for the profiler to fully initialize.
If you need to profile your web site from the start you can run IIS profiling from dotMemory using "Local (Remote) | IIS" configuration.
> The process did contain managed code
You can check that it really contains initialized clr assemblies at the moment you try to attach. Process Explorer tool can show this information: https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer
Please enable 'View | Show Lower Pane' and 'View | Lower Pane View | DLLs' settings. If your application's target framework is .NET Framework, version >= 4.0, w3wp process have to contain clr.dll as well as not empty .NET Assemblies tab in properties (Right click on the process | Properties | .NET Assemblies tab).