Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating an application pool in iis through bat file

I used the following code to use the inbuild application pool which as asp.net4.0 through bat command as

%systemroot%/system32/inetsrv/APPCMD set app "Sample" /applicationPool:"ASP.NET v4.0 Classic"
%systemroot%/system32/inetsrv/APPCMD set apppool /apppool.name:"ASP.NET v4.0 Classic" /managedPipelineMode:Integrated

but through this if ASP.NET v4.0 Classic is not present in the iis then it will throws error

so I need to install aspnet_regiis -i and the create a new pool with the pipeline mode :integrated through bat file.

Can you provide me a solution?

like image 857
GowthamanSS Avatar asked Aug 31 '25 04:08

GowthamanSS


1 Answers

i found solution as

to create application pool :

%systemroot%/system32/inetsrv/APPCMD add apppool /name:Poolname

To add application to pool :

%systemroot%/system32/inetsrv/APPCMD set app "applicationname" /applicationPool:"Poolname"

to set the other properties of that pool :

%systemroot%/system32/inetsrv/APPCMD set apppool /apppool.name:"Poolname" /managedPipelineMode:Integrated

Start the created pool :

%systemroot%/system32/inetsrv/APPCMD start apppool /apppool.name:"Poolname"

Install aspnet4.0 framework in iis as

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

Note: we can use any framework here.....

like image 73
GowthamanSS Avatar answered Sep 02 '25 18:09

GowthamanSS