无法让本地用户帐户作为 IIS 应用程序池的标识运行

无法让本地用户帐户作为 IIS 应用程序池的标识运行

我正在尝试使用本地用户帐户作为 IIS 应用程序池标识来推进项目,直到建立域信任为止。我尝试了所有我能想到的方法,让本地用户帐户运行应用程序池,而不会在第一次请求时出现 503。如果我使用我的域帐户,则没有问题。

如果我使用 IIS UI 并尝试将用户添加为应用程序池标识,则会收到无效密码错误,即使我复制并粘贴了用于创建本地用户帐户的密码,并且我知道它是正确的。奇怪的是,我可以使用以下脚本绑定使用:

try 
{       
  #WEB User Account- This will eventually be converted to a domain account 
  $username = "EUPOC_WebUser"
  $password = ConvertTo-SecureString "astronGpassword" -AsPlainText -Force

  #Remove-LocalUser -Name $username -ErrorAction Ignore | Out-Null
  #New-LocalUser -Name $username -Description 'For SSRS.' -Password $password -PasswordNeverExpires -AccountNeverExpires | Out-Null

  Remove-WebAppPool -Name "Test2"
  Remove-WebSite -Name "Test2"  

  $newAppPool = "Test2"
  $newAppPool = New-WebAppPool -Name $appPoolName -Force
  $newAppPool.autoStart = "true"
  $newAppPool.managedRuntimeVersion = $runTimeVersion
  $newAppPool.managedPipelineMode = $pipelineMode
  if ($enabled32BitApps -eq "true")
  {
       $newAppPool.enable32BitAppOnWin64 = "$enabled32BitApps"
  }
  if ($false -eq [System.String]::IsNullOrWhiteSpace($userName))
  {
      $newAppPool.ProcessModel.userName = "$username"
      $newAppPool.ProcessModel.password = "$password"
      $newAppPool.ProcessModel.identitytype = 3        
  }
  $newAppPool |Set-Item | Out-Null

  Write-Host "Create app-pool $appPoolName";
  New-WebSite -Name "Test2" -Port 80 -PhysicalPath "C:\WebApps\Test" -ApplicationPool "Test2" -Force | Out-Null
}catch{}

    我已将用户添加到这些安全策略中:

  • 作为服务登录
  • 作为批处理作业登录

我已将用户添加为以下成员:

  • iis_iusrs
  • 管理员

该网站仅包含一个 hello.html 网页,我已经尝试了所有应用程序池配置的组合。

我开始想也许公司政策阻止我这样做。这是公司不允许的常见行为吗?如果是,有没有办法进行直观检查,或者我需要 ping 安全运营经理吗?

相关内容