How to debug an ASP.NET 5 web application in local IIS, not Express

Thus, it is very easy to configure debugging for your ASP.NET application 4.6 (and <) in local IIS . However, I see no way to do this in ASP.NET 5 . I see IIS Express , ef and web . Am I missing something? How can I configure it so that I can click Play and raise the Chrome tab and completely debug my web app in local IIS ?

+5
source share
2 answers

Perhaps not quite what you need, but you can debug it.

  • Before you start debugging, you need to republish the project along the path specified in IIS.
  • Go to any application web page to start the process.
  • Then inside your VS go to Debug -> Attach to process . Find and select dotnet.exe . There may be several of them, so the tick of Show processes from all users may reveal several more entries. For example, the pool that I use for IIS for .net applications runs under the NetworkService identifier, so it’s easy for me to identify the dotnet.exe process that I need to connect (in Attach to Process popup there is a Username column containing identification information).

Finally, VS will start debugging. It is similar to the steps for .net framework + joining w3wp.exe

0
source

If you meant debugging the controller, you just need to make sure that you use your breakpoints correctly in the lines of the codes you created. After that, all you have to do is run through IIS Express, and you’ll be fine, VS will automatically offer you a look at the IDE, when you need to do a redo, etc.

From there, you can check your code using various debug windows in the "Debug" option on the top panel of VS.

top bar

By the way, if you carefully analyzed the state of local IIS with .NET Core, now there is no way to do this.

How to configure ASP.NET Core 1.0 to use local IIS instead of IIS Express?

And to further emphasize the pointlessness of using local IIS, here is a quote from this article :

However, with ASP.NET Core there is virtually no reason to run full IIS during development. What for? Because ASP.NET Core applications do not actually work inside IIS. Whether the call is being made from IIS, IIS Express, or you are executing the dotnet function directly from the command line, you use the same code and, in most cases, the same execution environment. Running inside IIS really doesn’t buy you anything else that you can’t easily simulate using the command line environment.

-1
source

Source: https://habr.com/ru/post/1237631/


All Articles