0

I am trying to compile and run ASP.net web api project in mono. On windows this projects works fine but in mono the GET method is called twice. This happens only with GET method. The project has authentication requirement, so if any end point is hit without authentication the returned error response is also twice. What can be the issue?

4
  • 2
    A little code would help. Can you add the controller and the client code? Commented May 10, 2016 at 6:41
  • I am sending the request through Postman plugin in chrome, there is no client code. We have 2 projects one for controllers and one for models. This issue was happening with our code so I simply downloaded the code example by microsoft (asp.net/web-api/overview/getting-started-with-aspnet-web-api/…) and tried running it. When I add this as a new project in our current solution everything works but when I add the controller to our controller project and try to run same issue occurs. Are there any global project specific settings that could be causing this? Commented May 10, 2016 at 8:32
  • Very strange. I am quite sure this is not related to a project setting. Did you try to put a break point on the method and trace the flow of control? May be that sheds some light on the issue. Commented May 10, 2016 at 10:11
  • Please put your last comment as an answer..and mark it. This will help future people...and also remove this from the "not answered' filtered on SOF. Commented May 10, 2016 at 17:12

1 Answer 1

2

Finally I was able to narrow down the issue. This was happening because WebApiConfig.cs was getting registered twice

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.