managedPipeLineMode issue on IIS8.5 [Answered]RSS

6 replies

Last post Jun 22, 2016 07:03 AM by Jean Sun

  • managedPipeLineMode issue on IIS8.5

    Jun 10, 2016 06:52 AM|arash-habibi1362|LINK

    Hi Guys,

    Basically our organization decided to migrate from IIS7 to IIS8.5 (Win 2012r2). I am using a custom windows powershell script.

    The issue is that, First: Identity wasn't tack it by my script ( I did some hard coding for this part and works at the end). Second issue, when I am using managedPipeLineMode  ( Integrated-0, Classic: 1  ) in my script, technically it gets the number; however, it's not actually change it in AppPool to Classic mode and keep it Integrated Mode.

    Part of my script


    $settings.AppPools.AppPool | foreach {
    $poolname=$_.name
    $identityType=$_.identityType
    $managedPipeLineMode=$_.managedPipeLineMode
    $fidId=$_.fidId
    $Enable32Bit=$_.Enable32Bit
    $dailyRecycle=$_.dailyRecycle

    if(!(Test-Path IIS:\AppPools\$poolname))
    {
    Write-Host "Create Wep App Pool '$poolname' ..."
    New-WebAppPool $poolname
    Set-ItemProperty ("IIS:\AppPools\"+$poolname) -Name ManagedRuntimeVersion -Value v4.0
    Set-ItemProperty ("IIS:\AppPools\"+$poolname) -Name ManagedPipeLineMode -Value $managedPipeLineMode
    #Write-Output $managedPipeLineMode
    Set-ItemProperty ("IIS:\AppPools\"+$poolname) -Name processModel.IdentityType -Value $identityType
    If ($Enable32Bit -ne $null) { # Some Services call 32 bit Oracle app
    If ($Enable32Bit.ToUpper() -eq "Y") {
    Set-ItemProperty ("IIS:\AppPools\"+$poolname) -name "enable32BitAppOnWin64" -Value "true"
    }

    Anybody has any idea? 

    Cheers,

    Arash

  • Re: managedPipeLineMode issue on IIS8.5

    Jun 10, 2016 08:34 AM|Jean Sun|LINK

    Hi,

    Please replace the code

    Set-ItemProperty ("IIS:\AppPools\"+$poolname) -Name ManagedPipeLineMode -Value $managedPipeLineMode

    With

    $AppPool = Get-Item ("IIS:\AppPools\" + $poolname)
    $AppPool | Set-ItemProperty -Name "managedPipelineMode" -Value $managedPipeLineMode

    Best Regards,

    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: managedPipeLineMode issue on IIS8.5

    Jun 10, 2016 12:59 PM|arash-habibi1362|LINK

    Hi Jean,

    I tried your suggestion. However, I got the same result as my code.

    I put Write-Output $managedPipeLineMode after managepipeline part, it shows get the right number (#1) but when I check in IIS GUI, it shows Integrated again. 

    Thanks,

    Arash

  • Re: managedPipeLineMode issue on IIS8.5

    Jun 12, 2016 10:49 PM|arash-habibi1362|LINK

    Hi Jean,

    Did you find a chance to look at my question?

    I wrote  write-output as follow, it shows #1; However, it sets Integrated insted of Classic when I check in IIS GUI. , 

    Write-Output $managedPipeLineMode

    Write-Output $AppPool

    Any thoughts? 

    Cheers,

    Arash

  • Re: managedPipeLineMode issue on IIS8.5

    Jun 13, 2016 06:47 AM|Jean Sun|LINK

    Hi,

    I can configure App pool's pipeline mode successfully using the code I posted above.

    $AppPool = Get-Item ("IIS:\AppPools\DefaultAppPool")
    $AppPool | Set-ItemProperty -Name "managedPipelineMode" -Value 1

    Value 0 : Integrated          Value 1 : Classic

    I'm not sure what's the value of $managedPipeLineMode in your code, please check it. Or you can post your whole script here, I will check it then.

    Best Regards,

    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: managedPipeLineMode issue on IIS8.5

    Jun 13, 2016 01:44 PM|arash-habibi1362|LINK

    Hi Jean,

    your code is perfect. However, have you tried on Wind 2012R2 with IIS 8.5.

    let me make it simple for myself :). I tried below command:

    PS IIS:\> Set-ItemProperty IIS:\AppPools\<MyApppoolName> -Name ManagedPipeLineMode -Value 1

    Powershell is not replaying any errors or anything but when I check in IIS GUI, nothing changed. 

  • Re: managedPipeLineMode issue on IIS8.5

    Jun 22, 2016 07:03 AM|Jean Sun|LINK

    Hi,

    let me make it simple for myself :). I tried below command:
    PS IIS:\> Set-ItemProperty IIS:\AppPools\<MyApppoolName> -Name ManagedPipeLineMode -Value 1
    Powershell is not replaying any errors or anything but when I check in IIS GUI, nothing changed.
    

    Same behavior on my side, and I can use Get-ItemProperty IIS:\AppPools\<MyApppoolName> -Name ManagedPipeLineMode to get the AppPool's value.

    It seems that this is a Bug, please use the code I posted above instead.

    Best Regards,

    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.