question

azure-7678 avatar image
0 Votes"
azure-7678 asked ryanchill answered

The system cannot find the file specified - azure key vault certificat

hello @HarshitaSingh-MSFT Please help me on issue . I am getting azure keyvault secrets and certificate in my local which is running on iisexpress. when i publish the code to production not working. Same way in local changed the runtime from iisexpress to IIS it is not working . I am using az cli login and also visual studio credentials is it possible to change settings IIS to iisexpress inside azure app service.

 var kvUri = $"https://{keyVaultName}.vault.azure.net";
                  ConfigurationBuilder builder = new ConfigurationBuilder();
                  builder.AddAzureKeyVault(new Uri(kvUri), new DefaultAzureCredential());
                  IConfiguration configuration = builder.Build();

using above code output certificate value adding to rest api headers to access my backend api. and the certificate is vary customer to customer . exact issue is explained in the link the-system-cannot-find-the-file-specified-azure-key-vault-certificat


azure-webappsazure-key-vault
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered

Hi @azure-7678,

To answer your question,

is it possible to change settings IIS to iisexpress inside azure app service

The answer is no, but that isn't your issue. I'm assuming you've created a managed identity and assigned it to a policy in your key vault. If so, then can you post below more about the error you receiving? Where in your code does it occur?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.