views:

63

answers:

2

I have an ASP.NET application which needs to run a command-line tool. I want to start it under the same process as the application pool so it is subject to the IIS CPU throttling, etc. How can this be done?

+1  A: 

Sorry to be a little off topic but I'm assuming this process is rather intensive / long running seeing as you want it to be throttled. If this is the case, its not advisable to have the IIS worker process doing this work.

See Here for the reason why.

Leigh Shayler
+1  A: 

This is not really possible. Think about how this works when you are using the command-line tool... the command line is really just a shell... when you luanch the app, it starts its own process... and in fact has nothing to do with the shell. The same thing would happen if you start the tool from an ASP.NET web app.

You'll have to come up with a different strategy for throttling the app if CPU hogging is an issue.

Bryan