Http error 500, unable to handle this request

krishna572 876 Reputation points
2022-04-13T01:32:18.147+00:00

A Simple .NET Core 3.1 Web Application fetching the data from the Azure SQL Server:

SQL Commands used:

CREATE TABLE Course
(
   CourseID int,
   CourseName varchar(1000),
   Rating numeric(2,1)
)

INSERT INTO Course(CourseID,CourseName,Rating) VALUES(1,'AZ-204 Developing Azure solutions',4.5)

INSERT INTO Course(CourseID,CourseName,Rating) VALUES(2,'AZ-303 Architecting Azure solutions',4.6)

INSERT INTO Course(CourseID,CourseName,Rating) VALUES(3,'DP-203 Azure Data Engineer',4.7)

SELECT * FROM Course

Update Course Set Rating = 4.7 Where CourseID = 1

Working locally but After deploying to Azure, getting 500 error.
I even added the Connection String in the Configuration > App Settings of the Web App (App Service) and Connection String in the appsettings.json file of the project.

sk6N9Kx.png

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,909 questions
{count} votes

Accepted answer
  1. Alberto Morillo 32,891 Reputation points MVP
    2022-04-13T01:40:05.35+00:00

    Have you enabled diagnostics logging? It can really help determine what is the cause of the issue.

    You can also use Visual Studio debug mode remotely to create traces and obtain detailed error messages.

    Make sure you configuire Azure SQL Database firewall.

    192420-1.png

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful