Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-AzureWebsite doesn't update ConnectionStrings #340

Closed
rickrain opened this issue Apr 16, 2015 · 11 comments
Closed

Set-AzureWebsite doesn't update ConnectionStrings #340

rickrain opened this issue Apr 16, 2015 · 11 comments
Labels
App Services aka WebSites Service Attention This issue is responsible by Azure service team.

Comments

@rickrain
Copy link

$website = Get-AzureWebsite $websiteName -slot $websiteSlot
$connectionStrings = $website.ConnectionStrings

$result = $connectionStrings.Remove(($connectionStrings | Where-Object {$_.Name -eq $connectionStringName}))

Set-AzureWebsite $websiteName -slot $websiteSlot -ConnectionStrings $connectionStrings

Reference:
http://stackoverflow.com/questions/29648327/cannot-delete-all-azure-website-connection-strings

@NaveenGoli
Copy link
Contributor

I will investigate

Thanks
Naveen


From: Rick Raineymailto:notifications@github.com
Sent: ‎4/‎15/‎2015 7:33 PM
To: Azure/azure-powershellmailto:azure-powershell@noreply.github.com
Subject: [azure-powershell] Set-AzureWebsite doesn't update ConnectionStrings (#340)

$website = Get-AzureWebsite $websiteName -slot $websiteSlot
$connectionStrings = $website.ConnectionStrings

$result = $connectionStrings.Remove(($connectionStrings | Where-Object {$_.Name -eq $connectionStringName}))

Set-AzureWebsite $websiteName -slot $websiteSlot -ConnectionStrings $connectionStrings

Reference:
http://stackoverflow.com/questions/29648327/cannot-delete-all-azure-website-connection-strings


Reply to this email directly or view it on GitHub:
#340

@devigned devigned added the App Services aka WebSites label Apr 20, 2015
@martincostello
Copy link

Any updates on whether this is definitely a bug?

@NaveenGoli
Copy link
Contributor

Sorry, I have been OOF and didn't get a chance to debug this.

Thanks
Naveen


From: Martin Costellomailto:notifications@github.com
Sent: ‎4/‎29/‎2015 6:28 AM
To: Azure/azure-powershellmailto:azure-powershell@noreply.github.com
Cc: Naveen Golimailto:ngoli@hotmail.com
Subject: Re: [azure-powershell] Set-AzureWebsite doesn't update ConnectionStrings (#340)

Any updates on whether this is definitely a bug?


Reply to this email directly or view it on GitHub:
#340 (comment)

@NaveenGoli NaveenGoli self-assigned this Jun 1, 2015
@winperec
Copy link

Any updates on this?

@martincostello
Copy link

Any progress on this issue?

@bspunie
Copy link

bspunie commented Jan 2, 2016

Can we please have an update on this?

huangpf added a commit to AzureRT/azure-powershell that referenced this issue Feb 13, 2016
@nallurisrinu
Copy link

$connStrings = @{ AzureWebJobsDashboard = @{ Type = "Custom"; Value = $AzureWebJobsDashboard };
AzureWebJobsStorage = @{ Type = "Custom"; Value = $AzureWebJobsStorage }};

Set-AzureRMWebApp -Name $webServiceName -ResourceGroupName $rgName -ConnectionStrings $connStrings

@cormacpayne
Copy link
Member

@twitchax: "Azure PowerShell continues to maintain RDFE support on a legacy basis: new functionality and bug fixes are addressed sparingly. This issue does not meet the current threshold for consideration."

@mganeshphani
Copy link

Just for the sake of people who reach this thread via Google/Bing .. looks like nallurisrinu's suggestion is working out here...

$connStrings = @{ AzureWebJobsDashboard = @{ Type = "Custom"; Value = $AzureWebJobsDashboard };
AzureWebJobsStorage = @{ Type = "Custom"; Value = $AzureWebJobsStorage }};
Set-AzureRMWebApp -Name $webServiceName -ResourceGroupName $rgName -ConnectionStrings $connStrings

@umaknow-jeanluc
Copy link

umaknow-jeanluc commented Oct 16, 2017

Also for people searching for this error :

Cannot validate argument on parameter 'ConnectionStrings'. Connection string type must be specified.

The Type value in the HashTable must be the string, explicitly, with .ToString().

$connStringsList = $webApp.SiteConfig.ConnectionStrings
$hashItems = New-Object System.Collections.HashTable
ForEach ($keyValuePair in $connStringsList) {
    $setting =  @{Type=$keyValuePair.Type.ToString();Value=$keyValuePair.ConnectionString.ToString()}
    $hashItems.Add($keyValuePair.Name,$setting);
}
Set-AzureRmWebApp -ResourceGroupName $resourceGroupName -Name $appServiceName -ConnectionStrings $hashItems

@xaviermignot
Copy link

@umaknow-jeanluc thanks a lot for your brilliant comment, you saved my day \o/

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Services aka WebSites Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests