How do I add a database to my web app?

SG 20 Reputation points
2024-03-25T22:02:08.5166667+00:00

Hi,

I have as .net 6 project which I want to upload using Azure Web App. I want top use the '60 CPU free minutes' free plan Azure offers.

I have created a Web App. However, I am struggling to create/add a database. The error I get is 'subscription not found'. It shows it in the image below which is the status message I get after the deployment of the database fails.

My questions are:

  1. Is it possible to add a database to the free 60 minute CPU plan?
  2. I want to use a free database for this. Is this possible?
  3. If the answer is yes to question 1 and 2 then what could be the issue based on the screenshot or your knowledge?

User's image

Azure SQL Database
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,881 questions
{count} votes

2 answers

Sort by: Most helpful
  1. hossein jalilian 2,535 Reputation points
    2024-03-25T22:21:54.3933333+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    I hope this link can help you

    Document

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments

  2. VenkateshDodda-MSFT 18,281 Reputation points Microsoft Employee
    2024-03-26T09:01:31.2866667+00:00

    @SG Thank you for posting your question in Microsoft Q&A forum, apologize for any inconvenience caused on this.

    Creating app service along with Database is possible for the app service plans that are higher than basic and standard.User's image

    Based on the information provided, I understand that you have created an app service on free tier, and you want to integrate it with SQL database both individual resources.

    As hossein jalilian mentioned you can create the free SQL database by the following those documented instructions.

    Once you have the resources you follow the below tutorials

    1. Different Secure ways to connect to databases from app service.
    2. Connect to Databases from app service using different programming languages.

    Hope this helps and let me know if you have any further questions on this.

    0 comments No comments