1
votes

enter image description here

Hi developers, I have developed a web application that can manage customer flow and the application works pretty fine in local machine but when I deployed to the Azure cloud service and running globally, it shows me these two errors whenever I tried to perform any function of the system. the following are the errors : "Failed to load resource: the server responded with a status of 403 (Forbidden)" "Failed to load resource: the server responded with a status of 500 (Internal Server Error)"

I have followed this youtube tutorial for the deployment process Youtube tutorial

1
Please try the following resources to troubleshoot those errors: docs.microsoft.com/en-us/azure/app-service/…Alberto Morillo
i have use node js language programming while you sent me ASP.netAlex
I would start by looking at sever logs. The 403 may mean file permissions or other configuration errors. But the 500 should have logged something.stdunbar

1 Answers

0
votes

I have seen that error 403 on Web applications that are using a login that may exist at Azure SQL Database logical server but have not been created as users on the target Azure SQL database.

Error 403 may be received also if the database user has been created on the database but does not have permission to query database objects. Please try the following:

-- Run this on master database
CREATE LOGIN WebAppLogin WITH PASSWORD = '<strong_password>';

-- Run this connected to the target database of yor app
CREATE USER WebAppLogin FROM LOGIN WebAppLogin; 

-- Provide permissions
ALTER ROLE db_owner ADD MEMBER WebAppLogin; 

Make sure login/user password is correct.

Although it may not be related, make sure a firewall rule to allow access to Azure SQL Database has been created.