I have implemented a web service using ASP.NET WebAPI framework.
The response time is faster in my local system (target framework4.5) that deploying to the server.
After deployment to Windows2012R2 IIS8.5, a response takes about 30 seconds for each request. I have tried the sample web service without any data retrieval from database. This also takes about longer time. I installed Fiddler and identified that TTFB took about 26 seconds.
I created the web service using this url:
https://www.c-sharpcorner.com/article/create-simple-web-api-in-asp-net-mvc/
Even displaying "welcome" message itself takes about 30 seconds. Any thoughts on where to look to investigate the performance issue? Here is sample code as in URL
namespace Demo1.Controllers
{
[System.Web.Mvc.SessionState(System.Web.SessionState.SessionStateBehavior.Disabled)]
public class DemoController : ApiController
{
public string Get()
{
return "Welcome To PARIS Web API";
}
public List<string> Get(int Id)
{
return new List<string> {
"Data1",
"Data2"
};
}
} }