Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have deployed my MVC application in IIS.

Suddenly my application is not working.

It is serving login page after clicking the button it is showing the error.

I have checked connection string and sql server all are correct.

Then i restarted the IIS then application working fine. Why?

What I have tried:

Set "Rapid-Fail Protection" -> "Enabled" to False.
Posted
Comments
Andy Lanng 24-Oct-18 8:34am    
No idea. Why not show us the error?
Bhushan@88 25-Oct-18 11:08am    
after waiting long time below error get displayed.

"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 was reached. "
Andy Lanng 25-Oct-18 12:20pm    
sounds like a connectivity issue. I'm guessing the sql server is on a different machine? if it happens again, try pinging the sql server from the iis server
Richard Deeming 25-Oct-18 13:17pm    
Sounds like you're opening lots of database connections, and not closing them properly.

Create the connections when you need them, and wrap them in using blocks:
using (SqlConnection connection = new SqlConnection("..."))
{
    ... Code to use the connection here ...
}
MadMyche 24-Oct-18 10:06am    
System and IIS logs would be helpful to you in figuring out why this is happening.

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