Azure Deployment to Web App - Conflict: Website with given name <web app name> already exists.


  • Hello,

    Last week I created a new Build Definition which is including a deployment to a Web App. It worked perfectly until this morning, when it stopped working.

    I keep getting the following error:

    Conflict: Website with given name <web app name> already exists.

    Here is more details from the log:

    2015-09-07T11:00:56.0673248Z Get-AzureWebSite -Name <web app name> -Slot dev -ErrorAction SilentlyContinue
    2015-09-07T11:01:09.6220426Z New-AzureWebSite -Name <web app name> -Location West Europe -Slot dev
    2015-09-07T11:01:16.1631443Z ##[error]Conflict: Website with given name <web app name>(dev) already exists.
    2015-09-07T11:01:16.1641480Z Publish-AzureWebsiteProject -Name "<web app name>" -Package "C:\a\b8d50c15\staging\<web app name>.zip" -Slot "dev"

    I tried to delete the deployment step, and then add it again but I still get the error. Also if I try to deploy to another geographical location, the same message pops out.

    My Web App is composed of the main one (production) + 2 deployment slots (dev and staging). I am trying to deploy to the dev slot.

    Any idea what could be wrong?

    Thanks for any help

    Monday, September 7, 2015 8:08 PM

All replies

  • Hi,

    It could be a residue of the service interruption in West Europe. Did you try deploying your Web App this morning?

    Let us know if this is resolved. If problem persist, share your website details indirectly following the link below so that we can look into this issue: 


    Best Regards

    Sadiqh Ahmed


    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful.

    Tuesday, September 8, 2015 6:44 AM
  • Hi,

    The Web App is deployed since last week - Thursday. I will now try to make a new full deployment and see if it changes. I will then post the results here.

    If nothing change then I will follow the procedure so that you can check this.


    Tuesday, September 8, 2015 7:26 AM
  • We're seeing the same behavior in our project. The deployment has worked for weeks, but suddenly it gives this error when trying to deploy the web application. I can confirm this is being attepted deployed in West Europe.

    I created a dummy site in the same app service plan: supportdummy

    Edit: Recreating the original sites is an option we'd really like to avoid.

    • Edited by Chris Rygg Tuesday, September 8, 2015 8:27 AM Clarification
    Tuesday, September 8, 2015 7:40 AM
  • Hi,

    Ok after creating a new plan from scratch it works well! The new plan is named http://dummydepl.azurewebsites.net

    And is also composed of two slots: dev and staging.

    So I guess the solution is to recreate my "real" web app from scratch, however if you are aware of a workaround to avoid this it would help


    Tuesday, September 8, 2015 8:00 AM
  • Hello Chris/Matt

    I see that you've already created a website with name "supportdummy" which is an existing one.

    With this command Get-AzureWebSite -Name <web app name> -Slot dev , you're calling the website with a slot. After that you need to run this command Publish-AzureWebsiteProject -Name "<web app name>" -Package "C:\a\b8d50c15\staging\<web app name>.zip" -Slot "dev".

    If you run the second command New-AzureWebSite -Name <web app name> -Location West Europe -Slot dev, with the already existing website name it will error up.

    @MattFFM0702 you were able to recreate the Web App with those 3 commands because you used a different Web APP name. For already existing website you need to use the first and the third command.

    Hope this information helps!

    Best Regards

    Sadiqh Ahmed


    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful.

    Tuesday, September 8, 2015 9:01 AM
  • We haven't changed the build definition (using the "Azure Web App Deployment" build step), but I see that the last green publish called:

    2015-09-07T06:59:39.7014443Z Get-AzureWebSite -Name [appname] -ErrorAction SilentlyContinue
    2015-09-07T06:59:49.2099687Z Publish-AzureWebsiteProject -Name "[appname]" -Package "C:\[path]\[projectname].zip" 

    However, now it calls:

    2015-09-08T08:52:56.7203746Z Get-AzureWebSite -Name [appname] -ErrorAction SilentlyContinue
    2015-09-08T08:53:04.4459153Z New-AzureWebSite -Name [appname] -Location West Europe
    2015-09-08T08:53:08.9519867Z ##[error]Conflict: Website with given name [appname] already exists.

    Has there been a change to the build system to explain this?

    Edit: I see this issue has been moved to the web app forum, even if it seems to be a VSO build issue. I guess it should be moved again?

    • Edited by Chris Rygg Tuesday, September 8, 2015 9:47 AM Wrong forum?
    Tuesday, September 8, 2015 9:24 AM
  • @Sadiqh, I am in the same case as Chris, using the Azure Web App Deployment build step from Visual Studio Online, so I cannot control the powershell commands behavior. The New-AzureWebSite cmdlet is also called which is causing the build to fail.

    • Edited by MattFFM07 Tuesday, September 8, 2015 9:48 AM clarification
    Tuesday, September 8, 2015 9:47 AM
  • FYI: I also tried to setup a slot and use that. The behavior is the same: It claims the web site already exists, even if no deployment has been made to it yet.
    Tuesday, September 8, 2015 11:17 AM
  • I've tried to re-run these commands locally and see a strange behavior:

    C:\> Get-AzureWebSite -Name [sitename]
    Get-AzureWebSite : Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials.
    At line:1 char:1
    + Get-AzureWebSite -Name [sitename]
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [Get-AzureWebsite], ArgumentException
        + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Websites.GetAzureWebsiteCommand

    I run Add-AzureAccount successfully and try again, with the same result. Could this be happening on the build server too? Errors are silently ignored... 

    Why might this be happening? I can access the site in both Azure portals with the same account and see nothing else indicating something is wrong with this accounts access to the site.

    • Edited by Chris Rygg Tuesday, September 8, 2015 12:44 PM
    Tuesday, September 8, 2015 12:35 PM
  • It seems this is related to:


    Workaround: When I disabled remote debugging for VS2015, the build worked. Turning it off while still set to 2015 apparently isn't enough.
    • Proposed as answer by Marek Láni Saturday, April 9, 2016 12:12 AM
    Wednesday, September 9, 2015 11:52 AM
  • On my side I still have the issue, even with a new Web App.

    I am not able to run a Continuous Deployment process from VSO.


    After deleting the Web App deployment step from the build, I am now able to deploy to newly created Web Apps. Still not possible to the existing Web App :( I think I will delete them all and recreate them.

    Does someone from Microsoft have any update on this?

    • Edited by MattFFM0702 Friday, September 11, 2015 3:12 PM update
    Friday, September 11, 2015 2:22 PM
    • Proposed as answer by Sunil Hurkadli Wednesday, September 16, 2015 4:29 AM
    • Unproposed as answer by MattFFM0702 Tuesday, November 10, 2015 9:14 AM
    Wednesday, September 16, 2015 4:29 AM
  • I experience the same issue on two distinct VSOs.

    The one web app is called http://jlstestazureappname.azurewebsites.net/ . It's just an empty boiler-plate MVC website at the moment. The web app was already created when I set up continuous deployment with a "Deployment" Azure Web App build step in VSO targeting the existing web app. When the build is executed and it tries to deploy to this web app, I get the error with "conflicting website with given name".

    When I triy the same build but targeting a non-existing web app (by suffixing the name above with "2"), it works like a charm and also subsequent build executions are able to overwrite the (now) existing web app.

    The other web app I am having issues with is located in the same Azure tenant as http://jlstestvsobuild.azurewebsites.net/ . It is the one with name ending with "gendevws".

    On this particular Azure tenant we are not able to delete and recreate the web apps - we need to be able to set up continuous deployment to the existing web apps there.

    Please assist :-)

    /Jesper www.idippedut.dk

    Tuesday, October 20, 2015 6:44 AM
  • I figured out a solution that didn't involve creating a new Web Site. There is a bug with the Get-AzureWebsite command where it does not support sites where debugging with VS2015 is set.

    To Fix:
    1. Enable Debugging and set version to 2013
    2. Save changes
    3. Disable debugging and Save Changes

    See the referenced bug: https://github.com/Microsoft/vso-agent-tasks/issues/693#issuecomment-152142049

    • Proposed as answer by Christopher Woolum Thursday, October 29, 2015 6:29 PM
    • Unproposed as answer by MattFFM0702 Tuesday, November 10, 2015 9:14 AM
    • Proposed as answer by Louliloul Thursday, November 19, 2015 9:59 AM
    Thursday, October 29, 2015 6:29 PM
  • Hi Christopher,

    I also found this bug and tried the action, but in my case it did not work. I also didn't even have the debugging enabled on any of the slots.

    FYI now I get a slightly different issue, which is discussed here.

    Friday, October 30, 2015 9:58 AM
  • This workaround has worked for me

    "Find a job you love and you’ll never have to work a day in your life" Confucius

    Thursday, November 19, 2015 9:59 AM
  • You should disable Remote Debuger on your Azure WebSite
    Thursday, January 21, 2016 7:20 AM
  • I got the similar issue. I tried to implement the steps. But no luck :( I am getting the same error.

    Detail Error:
    Get-AzureWebSite -Name dummy123 -ErrorAction SilentlyContinue -ErrorVariable azureWebSiteError -Slot production
    [warning]System.ArgumentException: Requested value 'Dynamic' was not found.**
    [warning] at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    [warning] at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
    [warning] at Microsoft.WindowsAzure.Management.WebSites.WebSpaceOperationsExtensions.ListWebSites(IWebSpaceOperations operations, String webSpaceName, WebSiteListParameters parameters)
    [warning] at Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebSitesManagementExtensionMethods.GetFromAzure(IWebSiteManagementClient client, String website)
    [warning] at Microsoft.WindowsAzure.Commands.Utilities.Websites.WebsitesClient.GetWebsite(String name)
    [warning] at Microsoft.WindowsAzure.Commands.Utilities.Websites.WebsitesClient.GetWebsiteConfiguration(String name)
    [warning] at Microsoft.WindowsAzure.Commands.Websites.GetAzureWebsiteCommand.WriteWebsite(Site websiteObject)
    [warning] at Microsoft.WindowsAzure.Commands.Websites.GetAzureWebsiteCommand.b__0()
    [warning] at Microsoft.WindowsAzure.Commands.Websites.GetAzureWebsiteCommand.Do(Action call)
    [warning] at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
    New-AzureWebSite -Name dummy123 -Location West US -Slot production
    Conflict: Website with given name dummy123 already exists.

    Publish-AzureWebsiteProject -Name "dummy123" -Package "C:\a\00b3423458\dummy123\drop\dummy123.zip" -Slot "production" -ErrorVariable publishAzureWebsiteError
    [warning]Cannot get website, deployment status is not updated

    Steps followed:

    1. Enabled remote debugging ON, Set VS Version to 2013 and saved the changes


    2. Disabled remote debugging OFF and saved the changes. Now, I see VS Version 2013

    image3. After both steps, I tried to redeploy website. Its giving the same error. I am wondering why Get-AzureWebsite command is unable to recognize whether webapp is existed or not in the portal. Why New-AzureWebSite -Name command is adding in the script? Can we customize the "Azure web deployment task" ps script?

    I would really appreciate if any solution / workaround for this issue. 

    Thanks, Pravek

    Friday, April 8, 2016 9:21 PM
  • Thanks Chris. Apparently this is bug and somebody from MS dev team should take care of it.
    Saturday, April 9, 2016 12:13 AM
  • I am facing the same issue. Also followed steps for remote debugging. But getting same error. Waiting for the solution. 1 thing I want to mention, My remote agent machine have Visual Studio 2015 installed. I don't know if it is creating problem.

    • Edited by Sadia Naz Tuesday, August 9, 2016 7:56 AM
    Tuesday, August 9, 2016 7:55 AM
  • Pravek, did you get its solution? I am still struggling.
    Wednesday, August 10, 2016 5:45 AM
  • My issue is resolved. I have mentioned wrong subscription id in Service end-point.
    Wednesday, August 10, 2016 8:17 AM
  • I had the same issue. It turned out that I had the wrong subscription selected in the deployment target.

    So, the release manager would try to get the web site within the selected subscription, fail, try to create a new azure web site that exists elsewhere in azure.

    Friday, October 28, 2016 5:47 AM