Sometimes an exception causes application pool
to shutdown. I start it manually but the question is how can I automate this behavior in IIS 7.0
(Windows server 2008).
相关问题
- how to call a C++ dll from C# windows application
- Recycling app pool each time a change has been mad
- .NET using wrong 2.0 machine.config instead of 4.0
- Catch the same exception twice
- Create CFrameWnd gives first-chance exceptions--wh
相关文章
- XCopy or MOVE do not work when a WCF Service runs
- IIS App Pools & Static Classes
- JUnit continue to assert things after expected exc
- The 'DbProviderFactories' section can only
- How to handle translation of exception message?
- correct way to store an exception in a variable
- UnhandledException Event doesn't work?
- ASP.NET code to detect whether IIS “Windows Authen
I am having a similar problem in Windows Server 2012 Standard and IIS 8. URLs with an ampersand character at the end cause IIS to freak out, and consider them malicious. This causes the App Pool to fail, crashing the website.
What you need to do is watch the Event Viewer for 1309 events. (In the Event ID column) You can set this up using Task Scheduler. When you see the event, you restart the App Pool.
To restart the App Pool, you can use a .vbs script like this:
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration") Set oAppPool = oWebAdmin.Get("ApplicationPool.Name='DefaultAppPool'") ' Recycle the application pool. oAppPool.Recycle
Or you could use Powershell if you like that better.
I use a pretty neat C# program that I found here: http://www.west-wind.com/weblog/posts/2012/Oct/02/A-tiny-Utility-to-recycle-an-IIS-Application-Pool
It does a great job, and seems to get around some of the permissions issues that the previous two methods have. I do have to run this script as an admin, though.
Hope this helps. It does not solve the problem, but it will take the heat off until there is a solution to this URL issue.
open iis select your website and on right hand side u see Actions
under Browse Web site -> Advanced Setting
select start Automatically to true.
If an application pool dies, the next request for a resource served by that pool will automatically restart it. If, however, you have rapid fail protection enabled on the app pool, and the pool dies more times than the number specified by the maximum failures property within the interval specified by the failure interval property, then you will receive a 503 Service Unavailable message. At this point, you will have to manually restart the app pool.
To work around this, either disable rapid fail protection for the app pool, or try increasing the number of faults within the time period, and then determine the root cause of the exceptions which are terminating the app pool.