-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't attach to ASP.NET Core application when hostingModel is "InProcess" and .NET CLR version was selected #13436
Comments
I do not believe ASP.NET Core 3.0 can target .NET Framework. See https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-2.2. +@DamianEdwards cc @tommcdon |
@jeffschwMSFT the above works and ends up hosting both CLRs in the same process (coreclr.dll and clr.dll). Are you trying attach to w3svc.exe or w3wp.exe? |
@davidfowl thanks a lot. You are right, surely Our profiler found both .NET Framework v4 and .NET Core v3 in the same process: |
Hmm, assuming that @ww898 is using the IPC server to start profiling, the error message makes me think that a Named Pipe doesn't exist for that PID. @ww898, could you try to repro this and then before attaching do |
The named pipe here is an IIS implementation detail, nothing to do with event pipe |
@josalem here it is:
P.S. I can create the memory dump for you if you want. |
When you launch w3wp.exe with/without the CLR loaded, does that cause it to use a different app-pool, possibly owned by a different user account? In order to connect to the named pipe the process initiating the connection must either be the same user account as the target or have admin rights. There could also be some other security privilege checks involved such as Mandatory Integrity Level checks that would prevent a lower rights process from connecting to a higher rights process. I think someone will need to setup a repro over here before we've got a more definitive answer, but my current bet is that the root cause will be a windows security check. |
Hi @ww898, we are triaging diagnostics issue for .NET 6 and are curious if this is still a problem, or has been narrowed down to a runtime issue. |
Hi @tommcdon, I can check the issue tomorrow with .NET Core 5.0 RC2. |
@tommcdon Our QA reproduced the issue with .NET Core 5.0-rc2 today. |
@ww898 can you both the successful scenario and the failing scenario and provide the output for |
With error in attach:
Without error in attach:
|
@ww898 this behavior is due to permissions issues. I set up a repro machine, and running as a regular user I cannot attach dotnet-trace to the process, but when running as adminstrator I can. Can you verify if running as administrator allows you to attach? |
This issue has been automatically marked |
The attach to
w3wp.exe
which contains .NET Core v3.0.100-rc1 inside (ASP.NET Core v3 application whereweb.config
hashostingModel="InProcess"
) hangs till the timeout when the IIS application pool configured in the following way:.
The server diagnostic thread in
w3wp.exe
is waiting for incoming connection inConnectNamedPipe
:It looks like the server pipe has wrong access rights in this case. It's the reason of timeout in the client application.
The attach works properly when the .NET CLR version set to "No Managed Code":
The detail repro case is here https://youtrack.jetbrains.com/issue/PROF-903.
The text was updated successfully, but these errors were encountered: