@Saumyabrata Bhattacharya The error message indicates that the server is not allowing cross-origin requests from your Angular application.
To enable CORS on an Azure Function app, you need to go to the CORS configuration screen under the Platform features tab of your Function app in the Azure portal. CORS with Access-Control-Allow-Credentials must be enabled for the SignalR client to call the negotiate function. Select the checkbox to enable it.
In the Allowed origins section, add an entry with the origin base URL of your web application.
Here is an example of how to configure CORS in your Azure Function app's host.json
file:
{
"IsEncrypted": false,
"Values": {
// values
},
"Host": {
"CORS": "http://localhost:4200",
"CORSCredentials": true
}
}
Make sure to replace http://<span class=" active-doc-0" data-doc-items="0">localhost:4200
with the origin base URL of your Angular application.