application-pool

Restarting (Recycling) an Application Pool

天大地大妈咪最大 提交于 2019-12-16 22:21:29
问题 How can I restart(recycle) IIS Application Pool from C# (.net 2)? Appreciate if you post sample code? 回答1: If you're on IIS7 then this will do it if it is stopped. I assume you can adjust for restarting without having to be shown. // Gets the application pool collection from the server. [ModuleServiceMethod(PassThrough = true)] public ArrayList GetApplicationPoolCollection() { // Use an ArrayList to transfer objects to the client. ArrayList arrayOfApplicationBags = new ArrayList();

single sign on iis 7.5 multiple application pools

旧巷老猫 提交于 2019-12-13 21:30:35
问题 I have a webapp in two parts (website and webdav part). Both are running in a seperate application pool in IIS 7.5 due a different framework. I want to use single sign on for both parts. For the first part (website) its running fine but for the webdav part single sign on doesn't work with a windows 7 client. When I try with application users (no single sign on), everything works fine for both parts. Both application pools are running with the same service account. I searched on the internet

Start MyAppPool using iisapp.vbs

瘦欲@ 提交于 2019-12-13 16:38:22
问题 I have a batch file that uses the following script to recycle MyAppPool . cscript.exe %windir%\system32\iisapp.vbs /a MyAppPool /r However when MyAppPool is Stopped, then I am not able to recycle it. What I want is to check weather MyAppPool is Stopped, if stopped , then Start it, recycle it and then Stop again. Well I am a complete newbie in this IIS thing and have never worked in it. I am using Window Server 2003 and IIS6. 回答1: You can write your own .vbs script, to lookup the .State of the

How many instances of an Application object can run per application

放肆的年华 提交于 2019-12-13 06:23:40
问题 I was reading the following post How to correctly use IHttpModule * Now lets think of the word itself. Application pool. Yes pool. It means that a certain web application is running multiple HttpApplication instances in one pool. Yes multiple. Otherwise it wouldn't be called a pool. »How many?« you may ask. That doesn't really matter as long as you know there could be more than one. We trust IIS to do its job. And it obviously does it so well that it made this fact completely transparent for

Set default app pool recycling via command line

亡梦爱人 提交于 2019-12-13 01:26:31
问题 I'm trying to execute the following command at the start of an Azure web role to set a specific time in which the app pool will be recycled: %windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.recycling.periodicRestart.schedule.[value='00:08:00'] But when I to do this I get the error: ERROR ( messsage:Cannot find requested collection element. ) Anyone know how to use appcmd to set default application pool settings to make it recycle at 8:00 AM UTC?

IIS application pool recycling and “shutdown time limit” role in overlapping

£可爱£侵袭症+ 提交于 2019-12-12 18:28:07
问题 When recycling happens, I want to move all new request to new w3wp (this is done automatically) and leave the previous w3wp to exit when it gets idle (whatever time it takes). There's a shutdown time limit config for application pools (I use IIS 7.0) which doesn't take 0 as a value. How can I let the previous w3wp to shutdown when it is done and idle. 回答1: The shutdown time limit hint leaves the old worker process running for up to the number of seconds indicated. If all requests are

PowerShell: retrieve number of applications in AppPool

守給你的承諾、 提交于 2019-12-12 08:40:06
问题 How to retrieve the number of applications associated with a specific IIS AppPool via PowerShell command? We can see the associated applications manually using: Get-Item IIS:\AppPools\AppPoolName However, if we manually want to select the Applications column, it is not possible. Also, the Applications column is not listed within | Get-Member * . Why is the column not listed? How to find the number of applications associated with a specific IIS AppPool using PowerShell? 回答1: The trick is:

How to remotely check the status of a web application pool with PowerShell?

為{幸葍}努か 提交于 2019-12-12 07:46:34
问题 I see a lot of scripts for recycling application pools on a web server running IIS7 but is there a way to check, with PowerShell, that the web application pool is running or stopped? I can't seem to figure out a way to remotely have Get-WebAppPoolState return the status on the Application Pool, and my Google-fu has not been able to come up with a replacement. I can remotely get gwmi to work and recycle or start my app pools but ideally I only want to have to run this if the app pool is

Passing DataReader from Method to .cs page - use CommandBehavior.CloseConnection but connection not closing

会有一股神秘感。 提交于 2019-12-12 05:48:38
问题 I use the following method in a class - which I call from .cs page filling a datareader: public static SqlDataReader getinfo(string username, string url) { //Initialise connection, string stored in Web.config SqlConnection conNs = new SqlConnection(ConfigurationManager.ConnectionStrings["conNs"].ConnectionString); SqlCommand cmdNs = new SqlCommand("usp_getinfo", conNs); cmdNs.CommandType = CommandType.StoredProcedure; cmdNs.Parameters.Add(new SqlParameter("@username", SqlDbType.VarChar, 50));

Get List of AppPools from IIS

故事扮演 提交于 2019-12-11 22:49:37
问题 I'm using vb.net 3.5 with asp.net and I need to list all AppPools names from IIS and show them in dropdownlist. any help please ? thanks 回答1: finally I found the solution and here is the methods it could help .. Public Function GetAppPoolNames() As List(Of String) Dim Root As System.DirectoryServices.DirectoryEntry = GetDirectoryEntry("IIS://localhost/W3SVC/AppPools") 'DirectoryEntry Root = new DirectoryEntry("IIS://localhost/W3SVC/1/Root"); Dim AppList As New List(Of String) If Root Is