GPGVM February 2016

VS 2015 / WebAPI Fiddler 200--Code Executes--Solid Breakpoint not hit

I have a weird one this morning. I have cleaned and rebuilt numerous timesas well as closed and reopened VS 2015. I have solid red break point and the code executes, other controllers with breakpoints are hit?? I don't understand what I am missing here.

Generally I have a solution with three projects.

  1. Web Api
  2. EF Repo
  3. MVC

Breakpoints in the MVC project are hit just fine. The code in the API controller executes just fine it just doesn't break? Fiddler reports a 200 and I can reissue the command and get 200's but never hit the break point?

It is a Multipart MIME and the mvc project has it's own port localhost:50009 while the api is localhost:50109 but that shouldn't matter I would think????

The path in case it matters is api/Upload/AttyUpload

[HttpPost]
[AllowAnonymous]
public async Task<HttpResponseMessage> AttyUpload()
{ ... }


<form action="http://localhost:50109/api/Upload/AttyUpload" method="post" enctype="multipart\form-data">....</form>

Edit

Following Batuta's comment I set two breakpoints. The first in the MVC startup.cs the second in the api global.asax.

The startup breakpoint is hit but the global.asax one is not. OK so I am running a compiled version of the api thus my breakpoints aren't hit?

Answers


GPGVM February 2016

Very weird to me as I would have expected it to launch on it's own but for some reason it wasn't. I went to the solution properties and set multiple startup projects selecting both the MVC app and the API to start. Once I did that I started hitting my breakpoints in the API no problem.

Post Status

Asked in February 2016
Viewed 2,477 times
Voted 12
Answered 1 times

Search




Leave an answer