简体   繁体   中英

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?

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.....

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