Getting error 500 in my Azure apim while trying to connect to RavenDB

Viewed 235

Locally, my api is working fine but in the Azure apim when i add these lines in the controller (to access my RavenDB) i get an internal server error 500.

Injecting IAsyncDocumentSession code

Http Response

Here is the startup configuration:

startup configuration

i'm also using AzureKeyVault to get the certificate to access my RavenDB.

DocumentStoreFactory using AzureKeyVault

I added the apim's IP in the allowed IPs of RavenDB Cloud, without success.

The question is, how can i fix that ?

Feel free to ask in case you need more informations.

EDIT I recently had more information about the error 500 Error 500 with SSL

Problem solved Waiting for @TinyWang to write his anwser instead of a comment. You can find the things that worked for me in the comments.

1 Answers

To sum up here and end this case:

According to the error message, we can see it comes from the error route in the server but not something wrong with azure apim. We can use kudu for azure web app to check the folder structure of server.

And as op said in the comment above, he chose to uploaded the certificate to the server.

I uploaded the certificate in the App Service of Azure using kudu in the C:\home\site\wwwroot> - Finally, i changed the x509KeyStorageFlags from DefaultKeySet to MachineKeySet

Related