3

I'm running my Deployments on the Release Management(Currently Preview) tool in VSO. When you configure a new Release(with the new release management tool on VSO) you can add to the Flow a task named:Azure PowerShell(Run a PowerShell script within an Azure environment)

What i'm trying to do is to Make some changes to the web.config using the Get-WebApplication and then Set-WebConfigurationProperty.

the error i get from the Log is: Process should have elevated status to access IIS configuration data. ##[error]Cannot find a provider with the name 'WebAdministration'.

Is it even possible to run those kind of commands in there or do you i need to use another kind of command to update my web.config?

2 Answers 2

1

There is no Azure API to make arbitrary transforms to your web.config.

Instead, the way this is typically done is to use the deployment time transform engine (e.g. via Web.Debug.config or using Chained Config transforms).

Sign up to request clarification or add additional context in comments.

Comments

0

If you're trying to set the web.config of an Azure WebApp then you need to use the Set-AzureWebSite cmdlet or the Set-AzureRMWebApp cmdlet.

Which one you need to use depends on which Azure cmdlets are installed on the machine running the script. The hosted servers for RM may still have the 0.9.x cmdlets (which uses SetAzureWebSite). The Set-AzureRMWebApp cmdlet is in the 1.x cmdlets. Either will work to set the config, you just need to use the appropriate cmdlet for what's have installed.

3 Comments

Thank you for your reply, Those command can be used to change the App settings of my web site, what i need is to update custom sections in my web.config
Ok, sorry - what specifically are you trying to write to web.config? Can you post a snippet? (code disambiguates everything :))
I want to change the Values from true to false <behavior> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.