question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR:Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware

See original GitHub issue

From @ealsur on May 20, 2016 20:11

  • VSCode Version:1.1.1
  • OS Version: Windows 10

Using C# Extension 1.0.11 and ASPNET Core RC2 (dotnet cli installed) using net461, I am unable to get Omnisharp to work.

Whenever I open a folder with a project with that version of ASPNET Core I get this error on the Omnisharp Log:

[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Processing [ProjectState] myproject/.NETFramework,Version=v4.6.1[ERROR:Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Copied from original issue: Microsoft/vscode#6592

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DustinCampbellcommented, Jul 21, 2016

This should be much better with the 1.3.0 release. In that release, we’ll be using the CoreCLR-based OmniSharp for .NET Core projects, which supports long file names. The problem is that the .NET Desktop version of OmniSharp (which we currently use on Windows) can crash with MAX_PATH issues.

1reaction
ealsurcommented, May 24, 2016

I can confirm that adding an exclude attribute to project.json fixes the issue.

image

The problem is that, according to the official annoucement, the exclude attribute is now deprecated on RC2 (it should be inside the buildOptions > compile tree), maybe it’s something that is still left to migrate on Omnisharp’s logic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net core - fail: Microsoft.AspNetCore.Diagnostics ...
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware is just the middleware catching exceptions when nothing else in your program did.
Read more >
ExceptionHandlerMiddleware Class - Microsoft Learn
A middleware for handling exceptions in the application.
Read more >
Unhandled Exception in Microsoft.AspNetCore.Diagnostics ...
After launching the blog in Visual Studio i'm getting: Hosting environment: Development Content root path: ...
Read more >
Error on 1.4.4 - Category: Microsoft.AspNetCore.Diagnostics ...
This is after running the MSI. An unhandled exception has occurred while executing the request. Exception: System.
Read more >
An error was encountered while handling the remote login
B) fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]An unhandled exception has occurred while executing the request.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found