-
Notifications
You must be signed in to change notification settings - Fork 2.1k
502.3 bad gateway when some controller can't load due to forgotten inheritance #5596
Comments
It's likely that your application is failing to start and running in to this - aspnet/Tooling#363. Try running it from the command line ( |
no, it's not failing to start, since I succeeded to get and post to other controllers, just if I trying call controllerA I get this error (I also tried running from the command line, and it is start without any error) |
@arielcloud what component do you feel should be throwing an exception? As far as MVC is concerned it appears that the controller doesn't exist, and that's at most a 404 error (there are of course infinitely many controllers that don't exist, and those don't thrown an exception). |
can u help me to feel this component?... do u know which component return this 502.3, so I'll ask them to give 404 which is maybe more indicative, otherwise u can close this, thanks! |
@arielcloud the ASP.NET Core Module (AspNetCoreModule / ANCM), which is an IIS module, is what's related to the 502.3. It shows that error when it can't even start the ASP.NET Core application. |
@Eilon , but as I said - in this case the app was up, and I could post and get to other controllers, so maybe it is a bug? |
should I open an issue here ? |
@arielcloud the 502.3 is I think generally only when the app can't load, or if the app completely crashed during a request. The question is what error is happening. So I recommend enabling logging to see what the exception is. |
thanks, the logs are good! |
I have controllerA and serviceA which injected to controllerA.
I forgot to inherit serviceA : IServiceA.
I got no error on compilation, since I'm using structureMap WithDefaultConventions(), so I didnt need to AddTransient<> explicitly.
Once I tried to post a http request to controllerA - the request is pending a long time, and then I got 502.3 bad gateway.
I tried to debug and ask visual studio to break on all exceptions, but no exception thrown.
so, it was very very hard to debug the problem...
any idea?
The text was updated successfully, but these errors were encountered: