简体   繁体   中英

Application pool Asp.net

I have an asp.net app and I want when this app is running on IIS,to run under an application pool with classic pipeline mode.

I know how to fix it through the IIS manager but I am wondering if it is possible to fix it from my app. I want either to change the pool or change the managed pipeline mode of the defaultAppPool.

Thank you

If your application have the right permission you may run this command line:

appcmd set app /app.name:string /applicationPool:string

The variable app.namestring is the name of the application that you want to change, and the variable applicationPoolstring is the name of the application pool to which you want to add the application

reference: Change an Application Pool for an Application

You can run a command line from your application using the System.Diagnostics.Process.Start function, and a simple example : How to redirect command line output to a ASPX page using c#?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM