application-pool

How to get Application Pool name through code (C#, ASP.net)

狂风中的少年 提交于 2019-12-01 15:48:06
I want to recycle the application pool through my application. Previously I was storing the application pool name in my database and using that to recycle. But It happened in the past that we moved apps from one app pool to another and sometimes we forget to update the app pool name in the database. So I am thinking to get the app pool name through the application and use that for recycling. May this can help: ApplicationPoolName Property Namespace: Microsoft.Web.Administration Assembly: Microsoft.Web.Administration (in Microsoft.Web.Administration.dll) http://msdn.microsoft.com/en-us/library

How to get Application Pool name through code (C#, ASP.net)

放肆的年华 提交于 2019-12-01 15:00:37
问题 I want to recycle the application pool through my application. Previously I was storing the application pool name in my database and using that to recycle. But It happened in the past that we moved apps from one app pool to another and sometimes we forget to update the app pool name in the database. So I am thinking to get the app pool name through the application and use that for recycling. 回答1: May this can help: ApplicationPoolName Property Namespace: Microsoft.Web.Administration Assembly:

Check the status of an application pool (IIS 6) with C#

我与影子孤独终老i 提交于 2019-12-01 08:11:02
问题 How can I check the status of an IIS6 application pool with C# ? For example, I want to know if it is running or not ! Thank's in advance for your help ! 回答1: http://msdn.microsoft.com/en-us/library/ms524962.aspx You can do this checking the AppPoolState Property: protected void status() { string appPoolName = "dev.somesite.com"; string appPoolPath = @"IIS://" + System.Environment.MachineName + "/W3SVC/AppPools/" + appPoolName; int intStatus = 0; try { DirectoryEntry w3svc = new

Drawback to creating a separate IIS application pool for each website / application

浪尽此生 提交于 2019-12-01 03:36:16
Currently, on our production IIS web farm, we host about 15 applications in a single App Pool (Default App Pool). There are two websites and about 13 virtual directories. A colleague has recommended that we change our IIS configuration so each application is a separate App Pool (with identical settings). Is there any drawback or potential issues to doing this? Is it possible that ASP.NET applications could have been built with the requirements that they are all within the same App Pool? I doubt they were built with that requirement in mind unless they rely on shared memory for some reason.

Worker process recycles because it reached its virtual memory limit

不羁的心 提交于 2019-12-01 00:18:29
问题 We host a rather large (self written) ASP.NET website for our customers. It consists of a web service, a web site and a image serving web site, all three in their own virtual directory. The three virtual directories are together in one application pool. The pool has both memory limits (maximum virtual memory and maximum used memory) set to 500 megabytes. However, the application pool suffers many recycles, even with only one user at a time. The eventlog message says: A worker process with

how to get the application pool name for a specific website IIS6 programmatically? C#

牧云@^-^@ 提交于 2019-11-30 17:23:37
问题 how to get the application pool name for a specific website IIS 6 programmatic using C# EDIT: I already used the methods of DirectoryServices namespace but the application pool name isn't retrieved correctly unless it was explicitly set by using the same code. Which means if u add a website manually using the iis manager and set an application pool, those codes won't work (it will always return DefaultAppPool) more over when I create an application using sharepoint and set a different appPool

ASP.NET application pool shutdown problem

谁说胖子不能爱 提交于 2019-11-30 15:02:50
问题 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). 回答1: 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

How do I set the .NET Framework Version when using New-WebAppPool?

天大地大妈咪最大 提交于 2019-11-30 12:58:38
问题 I'm looking to see how I can use the IIS PowerShell Cmdlet New-WebAppPool to specify the version of the .NET Framework to use. Currently, it defaults to v2.0, however I am using MVC, and this will not work because that's a v4.0 feature. We really want each site to have its own Application Pool, and it seems we must create those pools manually due to the inability to configure them via script. Is there any way to automate this? I'm afraid the answer is going to be "you can't," because the

How to tell why an IIS application pool is recycled

和自甴很熟 提交于 2019-11-30 12:43:17
问题 Background: I've deployed an ASP.NET MVC 3 app that works on my machine to a shared hosting provider and am discovering some problems that appear to be related to the application pool being recycled. The host has configured recycling to occur under any of these circumstances: Memory usage exceeds 200MB CPU usage exceeds 75% (presumably over a sustained period) 20 minutes of idle time The restrictions are more relaxed on my development machine so I wasn't seeing recycling like this during

How do I control the AppPool used for deploy through VS & MSDeploy settings

偶尔善良 提交于 2019-11-30 08:21:44
When I build a deploy package for my webapp the package contains an archive.xml file that contains the following: <createApp applicationPool="" MSDeploy.applicationPool="1" appExists="True" MSDeploy.appExists="1" ... /> Question: How can I control the application pool that the webapp gets installed into and, in some cases, create a new application pool? Are there VS settings that I can change to control the above output or otherwise affect how the application pool at deploy time? What I've found so far: 1. An MSBuild Parameter According to one SO post I can tell msbuild to use an app pool by