My azure function works well locally and gives response 200 ok, however, although the remote deployment is successful, it throws response 500

Lakpa D. Tamang 21 Reputation points
2023-01-12T02:38:42.2766667+00:00

I have been successful in testing my azure function locally. But whenver i try to test it remotely it fails with response 500 error. There is no problem with deployment as the deployment was termed successful.

I have looked into this issue, and tried to solve the problem. However, it seems that my local.settings.json and application settings are fine. Here is the snap shot of both.

My local.settings.json

Screen Shot 2023-01-12 at 11.27.44 AM

My application settings from settings > configuration.

User's image

I also checked into to my Application Insights > Logs and ran the query for exceptions causing failures as below.

User's image

User's image

I found out that the exceptionType thrown was "Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException" with failedMethod of "System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw". I investigated on this exception but was unable to find the root cause of my error.

I would highly appreciate if any prodigies in this field could help me out and resolve this issue. Thank you.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,937 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.