0

This is my fist MVC app in .net core, so be easy on me, please.

I have been trying to use my new mvc app as a RestAPI. Have a following case:

enter image description here

I am wondering, why does my debugger jump over the three yellow lines which have something to do with the service?

enter image description here

My DataService has a scoped lifetime.

By normal web requests, DataService runs normally, however, it seems that when using WebClient from an app on 4.52 framework, this wierd behaviour starts to show.

All I get returned is Http errorcode 500. If I use just return Content(string.Empty,..), or some other string, I get 200. So, it is definitely something about how the service is instatiated, but I am not sure where to look, and what to change in order to make this work.

Schattenjäger
  • 331
  • 1
  • 3
  • 13

0 Answers0