Azure / azure-functions-eventgrid-extension

EventGrid extension for Azure Functions
MIT License
48 stars 32 forks source link

EventGrid Trigger function returns Error: connect ECONNREFUSED 127.0.0.1:7071 when debugged locally #110

Closed vishnudassoman closed 1 year ago

vishnudassoman commented 1 year ago

When I try to debug an EventGrid Trigger function locally, it returns Error: connect ECONNREFUSED 127.0.0.1:7071. Request and response details are as given below.

POST http://localhost:7071/runtime/webhooks/EventGrid?functionName=UserWishlistEventSubscriber Error: connect ECONNREFUSED 127.0.0.1:7071 Request Headers aeg-event-type: Notification Content-Type: application/json User-Agent: PostmanRuntime/7.29.2 Accept: / Postman-Token: b7c95cde-90dd-49da-93b5-10dd51016b6d Host: localhost:7071 Accept-Encoding: gzip, deflate, br Connection: keep-alive Request Body [ { "id": "'1", "eventType": "yourEventType", "eventTime":"10:59:00.000", "subject": "yoursubject", "data": { "FirstName": "John", "Surname": "Smith" }, "dataVersion": "1.0" } ]

What is going wrong here?

vishnudassoman commented 1 year ago

I have figured it out. The port number mentioned in the launchSettings.json was different. When I used the same port number in the url mentioned above, it worked.