I have an ASP.NET MVC application that is deployed on Azure app service. I'm debugging this application on my local and its using IIS express. No IIS installed on the Windows 10 system.
My code is written like this: The user login is getting validated like this
try
{
using(var context = new techEntities())
{
wtuser u = (from c in context.wtUsers
where c.email == email select c).FristOrDefault();
if(u == null)
{
return new userOT {error = "Invalid email or password"};
}
...
}
}
catch(exception ex)
{
...
}
Connection string:
<add name = "localsqlserver"
connectionString = "Data Source=xxx;Initial Catalog=xxx; Integrated
Security=true;Max Pool Size=50000;" ProviderName = "System.Data.SqlClient"/>
I normally login into database using Windows authentication.I hope the way I have above connection string should not be a problem?
Note: the database I have exported from Azure and imported in local SQL express 2019.
However, I get this error:
System.Data.EntityException: The underlying provider failed to open.
System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size is reached.
What could be the problem? How to fix this? Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…