3

I get the following error:

Web deployment task failed. (Could not complete an operation with the specified provider ("appHostConfig") when connecting using the Web Management Service. This can occur if the server administrator has not authorized the user for this operation. appHostConfig http://go.microsoft.com/fwlink/?LinkId=178034 Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_AUTHORIZED_FOR_DEPLOYMENTPROVIDER.)

When I try to publish my project to Azure with "Configuration: Debug". If I use "Configuration: Release" there are no problems.

I have tried deleting and recreating the Azure website and re-installing the SDK.

I followed a tutorial to setup Azure so I think it is unlikely that I setup something wrong.

I've googled around and found people with a similar error however they don't seem to have a relation to the Debug/Release configuration...

2 Answers 2

5

It did worked!

But, just for making things easier, you can right-click in your project, and at properties, go to Package/Publish web and Unckeck the option

"Inculde IIS Settings as configured in IIS Express"

Remember (important!) you are in the right configuration (combo at the top) Release/Debug you are trying to publish.

3
  • This at least got me much further in the process... it has been running in the background for a while now. Without unchecking this option I was immediately provided the 'Web deployment task failed...", identical to the OP's error message. I also changed the Configuration to Debug (it was at "Active(Debug)"
    – IdusOrtus
    Nov 18, 2019 at 20:47
  • UPDATE: it worked fine & deployed to azuresites with no additional changes. Now to deploy the db. Thanks again, I appreciate you taking the time to answer - it saved me a bit of time and frustration.
    – IdusOrtus
    Nov 18, 2019 at 21:12
  • Stack overflow saves the day once again. This was my issue too. Sep 22, 2022 at 18:34
3

I got the same error ERROR_USER_NOT_AUTHORIZED_FOR_DEPLOYMENTPROVIDER in VS2013 while deploying to Windows Azure Websites (WAWS) and nothing nowhere to find to fix it.

It just so appears that my project deploys just great again after comparing the project file with a brand new one and finding the following difference, which I commented out to get it working again:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <DebugType>pdbonly</DebugType>
        <Optimize>true</Optimize>
        <OutputPath>bin\</OutputPath>
        <DefineConstants>TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
        <!--<IncludeIisSettings>true</IncludeIisSettings>-->
  </PropertyGroup>

So, right click the project and click Unload Project, right click it again and click Edit project.csproj and find the PropertyGroup with the condition matching whatever you're trying to deploy (Release|AnyCPU in this case) and make sure that line is commented out.

1
  • I was just updating configurations and suddenly started getting this error. Your tip helped me immensely!
    – rainabba
    Jan 22, 2021 at 20:01

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.