- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用此基本模板 http://4c74356b41.com/post5775 使用 SQL Server 2016 AlwaysOn 可用性组创建 Azure RM 模板我链接的模板对我来说太复杂了。我只需要创建 2 个虚拟机和 1 个存储帐户,并对虚拟机应用适当的 DSC。在将配置 sql-primary 和配置 sql-secondary 应用于两个虚拟机时,我收到以下错误:
Cannot find path 'HKLM:\\SOFTWARE\\Microsoft\\PowerShell\\3\\DSC' because it does not exist.
A duplicate resource identifier '[xSQLServerLogin]sqlLogintestdomain\\testadmin' was found while processing the specification for node 'localhost'.
Change the name of this resource so that it is unique within the node specification.
这是从博客文章中获取的 DSC 配置,我正在尝试应用它:
configuration sql-primary {
Param (
# Get deployment details
[Parameter(Mandatory)]
[String]$deploymentPrefix,
[Parameter(Mandatory)]
[String]$DomainName,
[String]$DomainNetbiosName = (Get-NetBIOSName -DomainName $DomainName),
# Credentials
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$SQLServiceCreds,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$WitnessAccount,
# Listener Configuration
[Parameter(Mandatory)]
[String]$SqlAlwaysOnAvailabilityGroupListenerIp,
# Minor things
[String]$bacpacUri = "https://github.com/AvyanConsultingCorp/pci-paas-webapp-ase-sqldb-appgateway-keyvault-oms/raw/master/artifacts/ContosoPayments.bacpac",
[UInt32]$DatabaseEnginePort = 1433,
[UInt32]$DatabaseMirrorPort = 5022
)
Import-DscResource -ModuleName PSDesiredStateConfiguration, xPSDesiredStateConfiguration, xComputerManagement, xNetworking, xActiveDirectory, xFailOverCluster, xSQLServer, xDatabase, xSmbShare
[System.Management.Automation.PSCredential]$DomainCreds = New-Object System.Management.Automation.PSCredential ("${DomainNetbiosName}\$($Admincreds.UserName)", $Admincreds.Password)
[System.Management.Automation.PSCredential]$DomainFQDNCreds = New-Object System.Management.Automation.PSCredential ("${DomainName}\$($Admincreds.UserName)", $Admincreds.Password)
[System.Management.Automation.PSCredential]$SQLCreds = New-Object System.Management.Automation.PSCredential ("${DomainNetbiosName}\$($SQLServiceCreds.UserName)", $SQLServiceCreds.Password)
# Prepare for configuration
Enable-CredSSPNTLM -DomainName $DomainName
$features = @("Failover-Clustering", "RSAT-Clustering-Mgmt", "RSAT-Clustering-PowerShell", "RSAT-AD-PowerShell")
$ports = @(59999, $DatabaseEnginePort, $DatabaseMirrorPort)
WaitForSqlSetup
Node localhost {
LocalConfigurationManager {
ConfigurationMode = "ApplyOnly"
RebootNodeIfNeeded = $true
}
User DisableLocalAdmin {
Disabled = $true
UserName = $Admincreds.UserName
Ensure = "Present"
}
WindowsFeatureSet Prereqs {
IncludeAllSubFeature = $true
Name = $features
Ensure = "Present"
}
File SetupFolder {
DestinationPath = "C:\setup"
Type = "Directory"
Ensure = "Present"
}
xSmbShare MySMBShare {
Name = "Setup"
Path = "C:\Setup"
FullAccess = "Everyone"
DependsOn = "[File]SetupFolder"
Ensure = "Present"
}
xRemoteFile FileDownload {
DestinationPath = "C:\setup\ContosoPayments.bacpac"
MatchSource = $true
Uri = $bacpacUri
DependsOn = "[File]SetupFolder"
}
foreach ($port in $ports) {
xFirewall "rule-$port" {
Access = "Allow"
Description = "Inbound rule for SQL Server to allow $port TCP traffic."
Direction = "Inbound"
DisplayGroup = "SQL Server"
DisplayName = "SQL Server $port (TCP-In)"
Name = "SQL-Server-$port-TCP-In"
LocalPort = $port -as [String]
Protocol = "TCP"
State = "Enabled"
Ensure = "Present"
}
}
xWaitForADDomain DscForestWait {
DomainName = $DomainName
DomainUserCredential = $DomainCreds
RetryCount = $RetryCount
RetryIntervalSec = $RetryIntervalSec
DependsOn = "[WindowsFeatureSet]Prereqs"
}
xComputer DomainJoin {
Name = $env:COMPUTERNAME
DomainName = $DomainName
Credential = $DomainCreds
DependsOn = "[xWaitForADDomain]DscForestWait"
}
xSQLServerServiceAccount "sqlServiceDomainAccount" {
SQLServer = $env:COMPUTERNAME
SQLInstanceName = "MSSQLSERVER"
ServiceType = "DatabaseEngine"
ServiceAccount = $SQLCreds
RestartService = $true
}
Script setSpn {
GetScript = "@{Ensure = `"set spn for sql service`"}"
TestScript = { $false }
SetScript = ( {
Invoke-Expression "setspn -D MSSQLSvc/{0}.{1}:1433 {0}$"
Invoke-Expression "setspn -D MSSQLSvc/{0}.{1} {0}$"
Invoke-Expression "setspn -S MSSQLSvc/{0}.{1}:1433 {2}"
Invoke-Expression "setspn -S MSSQLSvc/{0}.{1} {2}"
} -f $env:COMPUTERNAME, $DomainName, $SQLServiceCreds.UserName )
PsDscRunAsCredential = $DomainCreds
}
xCluster FailoverCluster {
DomainAdministratorCredential = $DomainCreds
Name = "${deploymentPrefix}-sql-cls"
StaticIPAddress = "${SqlAlwaysOnAvailabilityGroupListenerIp}0"
PsDscRunAsCredential = $DomainCreds
}
Script CloudWitness {
SetScript = ( {
Set-ClusterQuorum -CloudWitness -AccountName "{0}" -AccessKey "{1}"
} -f $WitnessAccount.UserName, $WitnessAccount.GetNetworkCredential().Password )
TestScript = "(Get-ClusterQuorum).QuorumResource.Name -eq `"Cloud Witness`""
GetScript = "@{Ensure = if ((Get-ClusterQuorum).QuorumResource.Name -eq `"Cloud Witness`") {`"Present`"} else {`"Absent`"}}"
DependsOn = "[xCluster]FailoverCluster"
PsDscRunAsCredential = $DomainCreds
}
foreach ($user in @($DomainCreds.UserName, $SQLCreds.UserName, "NT SERVICE\ClusSvc")) {
xSQLServerLogin "sqlLogin$user" {
LoginType = "WindowsUser"
Name = $user
SQLInstanceName = "MSSQLSERVER"
SQLServer = $env:COMPUTERNAME
Ensure = "Present"
}
}
xSQLServerRole sqlAdmins {
MembersToInclude = @($DomainCreds.UserName, $SQLCreds.UserName)
ServerRoleName = "sysadmin"
SQLInstanceName = "MSSQLSERVER"
SQLServer = $env:COMPUTERNAME
DependsOn = "[xComputer]DomainJoin"
Ensure = "Present"
}
foreach ($user in @("NT AUTHORITY\SYSTEM", "NT SERVICE\ClusSvc")) {
xSQLServerPermission "sqlPermission-$user" {
InstanceName = "MSSQLSERVER"
NodeName = $env:COMPUTERNAME
Permission = @("AlterAnyAvailabilityGroup", "ViewServerState", "ConnectSQL")
Principal = $user
Ensure = "Present"
}
}
xSQLServerMaxDop DegreeOfParallelism {
DynamicAlloc = $false
MaxDop = 1
SQLServer = $env:COMPUTERNAME
SQLInstanceName = "MSSQLSERVER"
Ensure = "Present"
}
xSQLServerAlwaysOnService enableHadr {
SQLServer = $env:computername
SQLInstanceName = "MSSQLSERVER"
DependsOn = "[xCluster]FailoverCluster"
Ensure = "Present"
}
xSQLServerEndpoint endpointHadr {
EndPointName = "${deploymentPrefix}-sql-endpoint"
Port = $DatabaseMirrorPort
SQLInstanceName = "MSSQLSERVER"
SQLServer = $env:computername
DependsOn = "[xSQLServerAlwaysOnService]enableHadr"
Ensure = "Present"
}
xSQLServerEndpointPermission endpointPermission {
InstanceName = "MSSQLSERVER"
NodeName = $env:computername
Name = "${deploymentPrefix}-sql-endpoint"
Principal = $SQLCreds.UserName
Permission = "CONNECT"
DependsOn = "[xSQLServerEndpoint]endpointHadr"
Ensure = "Present"
}
xSQLServerEndpointState endpointStart {
InstanceName = "MSSQLSERVER"
NodeName = $env:computername
Name = "${deploymentPrefix}-sql-endpoint"
State = "Started"
DependsOn = "[xSQLServerEndpoint]endpointHadr"
}
xSQLServerAlwaysOnAvailabilityGroup AvailabilityGroup {
AvailabilityMode = "SynchronousCommit"
Name = "${deploymentPrefix}-sql-ag"
SQLServer = $env:computername
SQLInstanceName = "MSSQLSERVER"
DependsOn = @("[xSQLServerEndpointState]endpointStart", "[xCluster]FailoverCluster", "[Script]setSpn")
Ensure = "Present"
PsDscRunAsCredential = $SQLCreds
}
xSQLServerAvailabilityGroupListener AvailabilityGroupListener {
AvailabilityGroup = "${deploymentPrefix}-sql-ag"
IpAddress = "$SqlAlwaysOnAvailabilityGroupListenerIp/255.255.255.0"
InstanceName = "MSSQLSERVER"
NodeName = $env:COMPUTERNAME
Name = "${deploymentPrefix}-sql-ag"
Port = 59999
DependsOn = "[xSQLServerAlwaysOnAvailabilityGroup]AvailabilityGroup"
Ensure = "Present"
PsDscRunAsCredential = $DomainCreds
}
xDatabase DeployBacPac {
Credentials = $DomainCreds
BacPacPath = "C:\setup\ContosoPayments.bacpac"
DatabaseName = "ContosoClinic"
SqlServer = $env:COMPUTERNAME
SqlServerVersion = "2016-SP1"
DependsOn = @( "[xSQLServerAlwaysOnAvailabilityGroup]AvailabilityGroup", "[xRemoteFile]FileDownload" )
Ensure = "Present"
}
xSQLServerAlwaysOnAvailabilityGroupDatabaseMembership DatabaseToAlwaysOn {
AvailabilityGroupName = "${deploymentPrefix}-sql-ag"
BackupPath = "\\${deploymentPrefix}-sql-0\setup\"
DatabaseName = "ContosoClinic"
SQLServer = $env:COMPUTERNAME
SQLInstanceName = "MSSQLSERVER"
DependsOn = @("[xDatabase]DeployBacPac", "[xSQLServerAlwaysOnAvailabilityGroup]AvailabilityGroup" )
Ensure = "Present"
PsDscRunAsCredential = $SQLCreds
}
}
}
configuration sql-secondary {
Param (
# Get deployment details
[Parameter(Mandatory)]
[String]$deploymentPrefix,
[Parameter(Mandatory)]
[String]$DomainName,
[String]$DomainNetbiosName = (Get-NetBIOSName -DomainName $DomainName),
# Credentials
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$Admincreds,
[Parameter(Mandatory)]
[System.Management.Automation.PSCredential]$SQLServicecreds,
# Minor things
[string]$clusterIp,
[UInt32]$DatabaseEnginePort = 1433,
[UInt32]$DatabaseMirrorPort = 5022
)
Import-DscResource -ModuleName PSDesiredStateConfiguration, xComputerManagement, xNetworking, xActiveDirectory, xFailoverCluster, xSQLServer
[System.Management.Automation.PSCredential]$DomainCreds = New-Object System.Management.Automation.PSCredential ("${DomainNetbiosName}\$($Admincreds.UserName)", $Admincreds.Password)
[System.Management.Automation.PSCredential]$DomainFQDNCreds = New-Object System.Management.Automation.PSCredential ("${DomainName}\$($Admincreds.UserName)", $Admincreds.Password)
[System.Management.Automation.PSCredential]$SQLCreds = New-Object System.Management.Automation.PSCredential ("${DomainNetbiosName}\$($SQLServicecreds.UserName)", $SQLServicecreds.Password)
# Prepare for configuration
$features = @("Failover-Clustering", "RSAT-Clustering-Mgmt", "RSAT-Clustering-PowerShell", "RSAT-AD-PowerShell")
$ports = @(59999, $DatabaseEnginePort, $DatabaseMirrorPort)
WaitForSqlSetup
Node localhost {
LocalConfigurationManager {
ConfigurationMode = "ApplyOnly"
RebootNodeIfNeeded = $true
}
User DisableLocalAdmin {
Disabled = $true
UserName = $Admincreds.UserName
Ensure = "Present"
}
WindowsFeatureSet Prereqs {
Name = $features
IncludeAllSubFeature = $true
Ensure = "Present"
}
foreach ($port in $ports) {
xFirewall "rule-$port" {
Access = "Allow"
Description = "Inbound rule for SQL Server to allow $port TCP traffic."
Direction = "Inbound"
DisplayName = "SQL Server $port (TCP-In)"
DisplayGroup = "SQL Server"
Name = "SQL-Server-$port-TCP-In"
LocalPort = $port -as [String]
Protocol = "TCP"
State = "Enabled"
Ensure = "Present"
}
}
xWaitForADDomain DscForestWait {
DomainName = $DomainName
DomainUserCredential = $DomainCreds
RetryCount = $RetryCount
RetryIntervalSec = $RetryIntervalSec
DependsOn = "[WindowsFeatureSet]Prereqs"
}
xComputer DomainJoin {
Name = $env:COMPUTERNAME
DomainName = $DomainName
Credential = $DomainCreds
DependsOn = "[xWaitForADDomain]DscForestWait"
}
xSQLServerServiceAccount "sqlServiceDomainAccount" {
SQLServer = $env:COMPUTERNAME
SQLInstanceName = "MSSQLSERVER"
ServiceType = "DatabaseEngine"
ServiceAccount = $SQLCreds
RestartService = $true
}
Script setSpn {
GetScript = "@{Ensure = `"set spn for sql service`"}"
TestScript = { $false }
SetScript = ( {
Invoke-Expression "setspn -D MSSQLSvc/{0}.{1}:1433 {0}$"
Invoke-Expression "setspn -D MSSQLSvc/{0}.{1} {0}$"
Invoke-Expression "setspn -S MSSQLSvc/{0}.{1}:1433 {2}"
Invoke-Expression "setspn -S MSSQLSvc/{0}.{1} {2}"
} -f $env:COMPUTERNAME, $DomainName, $SQLServiceCreds.UserName)
PsDscRunAsCredential = $DomainCreds
}
foreach ($user in @($DomainCreds.UserName, $SQLCreds.UserName, "NT SERVICE\ClusSvc")) {
xSQLServerLogin "sqlLogin$user" {
Name = $user
LoginType = "WindowsUser"
SQLInstanceName = "MSSQLSERVER"
SQLServer = $env:COMPUTERNAME
Ensure = "Present"
}
}
xSQLServerRole sqlAdmins {
MembersToInclude = @($DomainCreds.UserName, $SQLCreds.UserName)
ServerRoleName = "sysadmin"
SQLInstanceName = "MSSQLSERVER"
SQLServer = $env:COMPUTERNAME
DependsOn = "[xComputer]DomainJoin"
Ensure = "Present"
}
foreach ($user in @("NT AUTHORITY\SYSTEM", "NT SERVICE\ClusSvc")) {
xSQLServerPermission "sqlPermission-$user" {
InstanceName = "MSSQLSERVER"
NodeName = $env:COMPUTERNAME
Permission = @("AlterAnyAvailabilityGroup", "ViewServerState", "ConnectSQL")
Principal = $user
Ensure = "Present"
}
}
xSQLServerMaxDop DegreeOfParallelism {
DynamicAlloc = $false
MaxDop = 1
SQLServer = $env:COMPUTERNAME
SQLInstanceName = "MSSQLSERVER"
Ensure = "Present"
}
xWaitForCluster waitForCluster {
Name = "${deploymentPrefix}-sql-cls"
RetryIntervalSec = $RetryIntervalSec
RetryCount = $RetryCount
PsDscRunAsCredential = $DomainCreds
}
script joinCluster {
GetScript = "@{Ensure = `"join node to cluster with script resource, as cluster resource doesn't work in Azure`"}"
TestScript = "( Get-ClusterNode -Cluster {0} | Select-Object -ExpandProperty Name ) -contains `"{1}`"" -f $clusterIp, $env:COMPUTERNAME
SetScript = "Add-ClusterNode -Name {0} -NoStorage -Cluster {1}" -f $env:COMPUTERNAME, $clusterIp
DependsOn = "[xWaitForCluster]waitForCluster"
PsDscRunAsCredential = $DomainCreds
}
xSQLServerAlwaysOnService enableHadr {
SQLServer = $env:computername
SQLInstanceName = "MSSQLSERVER"
DependsOn = "[Script]joinCluster"
Ensure = "Present"
}
xSQLServerEndpoint endpointHadr {
EndPointName = "${deploymentPrefix}-sql-endpoint"
Port = $DatabaseMirrorPort
SQLInstanceName = "MSSQLSERVER"
SQLServer = $env:computername
DependsOn = "[xSQLServerAlwaysOnService]enableHadr"
Ensure = "Present"
}
xSQLServerEndpointPermission endpointPermission {
InstanceName = "MSSQLSERVER"
NodeName = $env:computername
Name = "${deploymentPrefix}-sql-endpoint"
Principal = $SQLCreds.UserName
Permission = "CONNECT"
DependsOn = "[xSQLServerEndpoint]endpointHadr"
Ensure = "Present"
}
xSQLServerEndpointState endpointStart {
InstanceName = "MSSQLSERVER"
NodeName = $env:computername
Name = "${deploymentPrefix}-sql-endpoint"
State = "Started"
DependsOn = "[xSQLServerEndpoint]endpointHadr"
}
xWaitForAvailabilityGroup waitforAG {
Name = "${deploymentPrefix}-sql-ag"
RetryIntervalSec = $RetryIntervalSec
RetryCount = $RetryCount
DependsOn = @("[xSQLServerEndpointState]endpointStart", "[Script]joinCluster", "[Script]setSpn")
PsDscRunAsCredential = $DomainCreds
}
xSQLServerAlwaysOnAvailabilityGroupReplica AddReplica {
AvailabilityGroupName = "${deploymentPrefix}-sql-ag"
AvailabilityMode = "SynchronousCommit"
Name = $env:COMPUTERNAME
PrimaryReplicaSQLServer = "${deploymentPrefix}-sql-0"
PrimaryReplicaSQLInstanceName = "MSSQLSERVER"
SQLInstanceName = "MSSQLSERVER"
SQLServer = $env:COMPUTERNAME
DependsOn = "[xWaitForAvailabilityGroup]waitforAG"
Ensure = "Present"
PsDscRunAsCredential = $SQLCreds
}
}
}
function WaitForSqlSetup {
while ($true) {
try {
Get-ScheduledTaskInfo "\ConfigureSqlImageTasks\RunConfigureImage" -ErrorAction Stop
Start-Sleep -Seconds 5
}
catch {
break
}
}
}
function Get-NetBIOSName {
[OutputType([string])]
param(
[string]$DomainName
)
if ($DomainName.Contains(".")) {
$length = $DomainName.IndexOf(".")
if ( $length -ge 16) {
$length = 15
}
return $DomainName.Substring(0, $length)
}
else {
if ($DomainName.Length -gt 15) {
return $DomainName.Substring(0, 15)
}
else {
return $DomainName
}
}
}
function Enable-CredSSPNTLM {
param(
[Parameter(Mandatory = $true)]
[string]$DomainName
)
# This is needed for the case where NTLM authentication is used
Write-Verbose "STARTED:Setting up CredSSP for NTLM"
Enable-WSManCredSSP -Role client -DelegateComputer localhost, *.$DomainName -Force -ErrorAction SilentlyContinue
Enable-WSManCredSSP -Role server -Force -ErrorAction SilentlyContinue
if (-not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -ErrorAction SilentlyContinue)) {
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name "\CredentialsDelegation" -ErrorAction SilentlyContinue
}
if ( -not (Get-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -Name "AllowFreshCredentialsWhenNTLMOnly" -ErrorAction SilentlyContinue)) {
New-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -Name "AllowFreshCredentialsWhenNTLMOnly" -value "1" -PropertyType dword -ErrorAction SilentlyContinue
}
if (-not (Get-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -Name "ConcatenateDefaults_AllowFreshNTLMOnly" -ErrorAction SilentlyContinue)) {
New-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -Name "ConcatenateDefaults_AllowFreshNTLMOnly" -value "1" -PropertyType dword -ErrorAction SilentlyContinue
}
if (-not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -ErrorAction SilentlyContinue)) {
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation -Name "AllowFreshCredentialsWhenNTLMOnly" -ErrorAction SilentlyContinue
}
if (-not (Get-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name "1" -ErrorAction SilentlyContinue)) {
New-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name "1" -value "wsman/$env:COMPUTERNAME" -PropertyType string -ErrorAction SilentlyContinue
}
if (-not (Get-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name "2" -ErrorAction SilentlyContinue)) {
New-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name "2" -value "wsman/localhost" -PropertyType string -ErrorAction SilentlyContinue
}
if (-not (Get-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name "3" -ErrorAction SilentlyContinue)) {
New-ItemProperty HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name "3" -value "wsman/*.$DomainName" -PropertyType string -ErrorAction SilentlyContinue
}
Write-Verbose "DONE:Setting up CredSSP for NTLM"
}
[Int]$RetryCount = 100
[Int]$RetryIntervalSec = 15
# $cd = @{
# AllNodes = @(
# @{
# NodeName = "localhost"
# PSDscAllowDomainUser = $true
# PSDscAllowPlainTextPassword = $true
# }
# )
# }
这正是我正在部署的 ARM 模板 https://pastebin.com/d52BpEFM
最佳答案
这里总结一下几点:
Cannot find path 'HKLM:\SOFTWARE\Microsoft\PowerShell\3\DSC'because it does not exist.
似乎是出现问题时抛出的一般错误(至少我永远找不到它出现的模式),因此可以安全地忽略该错误,当您修复真正的错误时,它就会消失(在我的经验)。
SQL 配置(有时)会失败并出现奇怪的错误(通常与 dns\timing 相关)。我不确定这在提前预先创建域的环境中会如何表现。总体上它可能不那么脆弱。
在我最新的提交中(在撰写本文时),我相信我已经解决了一些稳定性问题,并且我非常确定域、备份存储、keyvault 已经预先创建了这些问题根本不应该出现问题。
关于Azure DSC 扩展。 HKLM :\SOFTWARE\Microsoft\PowerShell\3\DSC doesn't exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47154974/
我是 magento 的新手,目前我在 magento 安装期间遇到“必须加载 PHP 扩展 curl ”错误。你能帮帮我吗? 最佳答案 如果您的服务器上没有安装 curl,您可以键入以下命令之一来安
我在 macOS Mojave/macOS Big Sur/macOS Monterey/macOS Ventura 上使用最新的 php 版本 7.2 并收到类似错误 $composer requ
这个问题已经有答案了: Why generic type is not applicable for argument extends super class for both? (5 个回答) 已关
我正在使用 NightWatch.js 并进行一些 UI 测试,我想用一些额外的 desiredCapabilities 启动默认浏览器实例(即启用扩展并应用一些特定值)。 p> 注意:我可以执行这些
有人知道为什么我在 java 8 中使用此代码时没有服务器扩展名称吗: try { URL url = new URL(urlString); URLC
扩展提供给我的类(class)。为现有的类提供新功能。或扩展现有的mixin s 或虚拟类,任何东西都可以工作。 也许是这样的: class FlatButton {} // maybe no
我有一个关于使用 c 代码和 mod_wsgi 扩展 python 的问题。 我在 apache 服务器中有一个 django 应用程序,它查询 postgresql 数据库以生成报告。在某些报告中,
testcafe支持在Chrome浏览器中加载crx扩展吗? 如果是这样,请告诉我需要尝试什么方法。 我尝试了下面的代码,但没有成功 await t.eval(new Function(fs.read
这个问题已经有答案了: What is a raw type and why shouldn't we use it? (16 个回答) 已关闭 3 年前。 有什么区别: // 1 class A c
我正在编写一个 chrome 扩展来记录单击开始按钮后触发的请求。 这是我的文件:1. list .json { "manifest_version": 2, "name": "recorde
我每天都在使用 vim 和 perforce 现在我的问题是,如果我想查看 perforce 文件修订版,则从命令模式下的 vim :!p4 打印文件#1 vim 试图让我获得缓冲区 #1。有没有办法
大家好,我有一个关于 NUnit 扩展(2.5.10)的问题。 我想做的是向 数据库。为此,我使用 Event 创建了 NUnit 扩展 听众。 我遇到的问题是公共(public)无效 TestFin
我有弹出窗口,而不是模态窗口。 如何通过单击页面的其他部分(不在窗口中)来关闭此窗口? 最佳答案 像这样的东西: function closeWin(e, t) { var el = win.
我通常非常谨慎地使用扩展方法。当我确实觉得有必要编写一个扩展方法时,有时我想重载该方法。我的问题是,您对调用其他扩展方法的扩展方法有何看法?不好的做法?感觉不对,但我无法真正定义原因。 例如,第二个
扩展 Ant Ant带有一组预定义的任务,但是你可以创建自己的任务,如下面的例子所示。 定制Ant 任务应扩展 org.apache.tools.ant.Task 类,同时也应该拓展 execut
我想要一个重定向所有请求的扩展: http://website.com/foo.js 到: http://localhost/myfoo.js 我无法使用主机文件将主机从 website.com 编辑
对于为什么 QChartView 放在 QTabWidget 中时会扩展,我有点迷惑。 这是 QChartView 未展开(因为它被隐藏)时应用程序的图片。 应用程序的黑色部分是 QOpenGLWid
如果在连接条件中使用 OR 运算符,如何优化以下查询以避免 SQL 调优方面的 OR 扩展? SELECT t1.A, t2.B, t1.C, t1.D, t2.E FROM t1 LEFT J
一旦加载插件的问题得到解决(在 .NET 中通过 MEF 的情况下),下一步要解决的是与它们的通信。简单的方法是实现一个接口(interface),使用插件实现,但有时插件只需要扩展应用程序的工作方式
在我的 Symfony2 包中,我需要检查是否定义了一个函数(一个扩展)。更具体地说,如果安装了 KnpMenuBundle,我会在我的包中使用那个,否则我将自己渲染插件。 我试过了,但这当然不起作用
我是一名优秀的程序员,十分优秀!