How to fix 'The timeout period elapsed' error C#.net - pooling

How to fix 'The timeout period elapsed prior to obtaining a connection from the pool' error. C#.net in windows XP application and .net framework 4.0

Related

What would cause an Access is Denied Exception on Process.StartTime?

I have a ASP.NET web application on Windows 7.
The application runs as an administrator on the server and intermittently I get the unexpected error:
System.ComponentModel.Win32Exception (0x80004005): Access is denied
at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
at System.Diagnostics.Process.GetProcessTimes()
at System.Diagnostics.Process.get_StartTime()
When I call:
_process = Process.GetCurrentProcess();
_startupTime = _process.StartTime;
It looks like the issue is caused because of the way we do security. This function should only get called on start up which should happen as an Admin but if the Application Pool restarts itself after a period of inactivity (set to 20 minutes) by changing it to 24 hours the problem went away as we never have a period of 24 hours of inactivity.

Error Deploying Web application into my local IIS

I am making a publish of my application to my local IIS and I am getting in my browser an error:
Service Unavailable
HTTP Error 503. The service is unavailable.
I went to my IIS and noticed that the 'DefaultAppPool' stopped, restarted again and try to access to the app again and same error and the app pool stopped again.
then I went to the Event Viewer and I was getting this error:
The worker process for application pool 'DefaultAppPool' encountered an error
'Cannot read configuration file due to insufficient permissions' trying to read configuration data from file
'\?\C:\Windows\Microsoft.NET\Framework\v4.0.30319\CONFIG\machine.config', line number '0'. The data field contains the error code.
any help??

DirectoryServicesCOMException 80072020 From IIS 7.5 Site Running Under ApplicationPoolIdentity

I'm having trouble hunting down an issue where an ASP.NET 4 application fails while trying to get user groups for a given user from time to time. The application pool associated with this application is setup to run under ApplicationPoolIdentity.
Exception Info
System.DirectoryServices.DirectoryServicesCOMException
HRESULT: 80072020
Message: An operations error occurred.
Extended Message: 000004DC: LdapErr: DSID-0C0906E8, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v1db1
Stack Trace
System.DirectoryServices.DirectoryEntry.Bind(Boolean)
System.DirectoryServices.DirectoryEntry.Bind()
System.DirectoryServices.DirectoryEntry.get_AdsObject()
System.DirectoryServices.DirectorySearcher.FindAll(Boolean)
System.DirectoryServices.DirectorySearcher.FindOne()
95%-99% of the time, this function works fine, but from time to time, it just starts failing. When I change the application pool to use LocalSystem or NetworkService, it starts working. When I change back to ApplicationPoolIdentity it begins failing again. The only way to get the site working again with ApplicationPoolIdentity is to reboot the server.
I was able to find a similar issue here, but the resolution was a reboot as well. I'd like to find a more permanent solution short of changing the identity of the application pool.
While a reboot will resolve the issue temporarily, there is a Microsoft hotfix KB2545850 that offers a permanent fix to the issue.

ApplicationPoolIdentity 503 Error

This morning I have tried to load all my websites on my local PC that has IIS 7.5 and straight away i get a HTTP 503 Error.
HTTPerr log says: 2012-08-17 08:43:26 127.0.0.1 49326 127.0.0.1 80 HTTP/1.1 GET / 503 3 AppOffline web80
So my application pool is not starting. I try restarting the app pool in IIS and I still get the error. When I look at the App pool I see that it has stopped. So I look in Event viewer:
Error: WAS : Application pool 'web80' is being automatically disabled due to a series of failures in the process(es) serving that application pool.
Warning: WAS : The Windows Process Activation Service failed to create a worker process for the application pool 'web80'. The data field contains the error number.
Looking around the web and stackoverflow, the problem seems to be caused by app pools identity being apppoolidentity. I changed this to local system and it works.
But why out the blue would this just stop working? I've read another solution that you need to provide permission to
C:\Windows\System32\config\Schema but I don't have a Schema folder.Could that be the reason why?
Really all I want to know is how do I get the application pool to reuse the apppoolidentity or where can I look to try things out? I could try re-intall iis but if I can figure out what causes this, I might be able to prevent it in the future.
Thanks
I just ran into this recently. In my scenario, I had the Application Pool Identity set to my Active Directory account under the 'Custom account' setting. Recently I updated my password so I just reset my password for the 'Custom account' accordingly and I was able to reload my application.

IIS 7 Service Unavailable 503 ERROR

I am encountering a 503 - Service Unavailable error. I checked the event log and found this:
The Module name FastCgiModule path
C:\WINDOWS\System32\inetsrv\iisfcgi.dll
returned an error from registration.
The data is the error.
Note: Every time I try to visit my website, I found that the DefaultAppPool will auto-stop.
And also found this in event log:
Application pool 'DefaultAppPool' is
being automatically disabled due to a
series of failures in the process(es)
serving that application pool.
This is because your application pool is crashing more than 5 times in 5 minutes [default settings - Rapid Fail]
Instead of disabling Rapid Fail, you should consider taking Crash Dumps and try to find out the root cause. http://blogs.msdn.com/b/rahulso/archive/2006/03/02/what-is-a-crash-technically-in-asp-net-and-what-to-do-if-it-happens.aspx

Resources