2

I am making a ERP with Identity Core RC 2. I am facing a very strange problem. I am putting a relationship between my User table which is "ASPNETUSER" and other table. The problem is that when I add this relationship my application starts giving 502.3 Bad Gateway Error when I post my form for insertion, but when I removed it, it starts working fine. Please look into this. I am very frustrated due to it.

Thanks in advance.

Ali Arshad
  • 21
  • 1
  • 4
  • Try to set `options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;` described in [the answer](http://stackoverflow.com/a/34836837/315935) or in UPDATED part of [the answer](http://stackoverflow.com/a/34292291/315935). – Oleg May 29 '16 at 16:42
  • Dear @Oleg! Sorry your solution isn't work – Ali Arshad May 29 '16 at 20:11
  • Do you use the latest `Newtonsoft.Json` too? In general it's important to understand that **any long operation** like setting of breakpoint on any line of the server code and waiting about 1 min follows to 502.3 Bad Gateway Error. It means that 502.3 Bad Gateway Error can have really many reasons. – Oleg May 29 '16 at 20:16
  • Can it be that after the changes the application takes a long time to start and IIS timeouts? Try running your application without IIS/IISEcpress first and see what is happening. – Pawel Jun 02 '16 at 17:21

2 Answers2

0

I believe my issue is related.

Do you expierence the memory growth as well?

Community
  • 1
  • 1
Drake
  • 11
  • 3
0

Try this, it worked for me:

To use this, https://gist.github.com/rynowak/9488b3b1a6b81876d8b14de72feb0857 paste that class into your project, and add the following line to your ConfigureServices

services.AddSingleton<IModelBinderFactory, MyModelBinderFactory>();

Full explanation: https://github.com/aspnet/Mvc/issues/4666

Drake
  • 11
  • 3