locked
Publishing To Azure Error RRS feed

  • Question

  • User1628746328 posted

    So I'm pretty new to Azure, but am attempting a web deploy in order to test a proof-of-concept that I've been working on that contains a .mdf data store.

    Each time I attempt to publish the solution I encounter an error:

    Severity    Code    Description    Project    File    Line
    Error        Web deployment task failed. (Could not deploy package.
    Unable to connect to target server.
    
      Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.)    AutomatedSurvey.Web        0


    When I attempt to Preview Database in the last step I receive this error:

    Web deployment task failed. (Could not generate deployment script.
    Unable to connect to target server.
    
      Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.)

    Step 1

    Step2

    Step 3

    Step 4

    Thanks for any help/advice..

    doug

    Thursday, October 29, 2015 5:34 PM

Answers

  • User1166036563 posted

    Hi Doug,

    ERROR_EXECUTING_METHOD indicates a generic error code when dealing with the mdf file in deployment. It does not provide enough information for troubleshooting. Have you tried to see stack trace and message associate with this code? The following page explains web deploy error codes, please refer to see http://www.iis.net/learn/publish/troubleshooting-web-deploy/web-deploy-error-codes

    Additionally, are you using on-premises SQL Server and save database file in your web app folder? I guess the problem is caused by on-premises SQL Server management tool which holding that mdf file and deployment cannot access mdf file. If this is the scenario, you should try to separate database from SQL Server and then redeploy web app again.

    Another point, if you want to use SQL Server in Azure, I would recommend you use Azure SQL Database to instead of on-premises database. You can find more information from here. https://azure.microsoft.com/en-us/documentation/services/sql-database/

    Regards,

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 30, 2015 2:55 AM