Click here to Skip to main content
15,905,414 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am calling web api services from angularjs. I am setting some custom header before calling the service. I am getting the value by Request.Headers.GetValues. It is working fine.

But the problem is if I call multiple service immediately or same service multiple time immediately , then I am getting the header null at server.

If I use some setTimeout from JavaScript before service call then again it is working fine.

Can anybody let me know what is wrong with my approach?

Thanks in advance.
Posted
Updated 11-Jan-16 17:02pm
v3

1 solution

Use async web api approach to resolve problem.
Reference Link : Asynchronous Controller of Web API 2

Hopefully it will work ...!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900