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

azure 1 Reputation point
2021-07-14T12:27:27.503+00:00

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 Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,194 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,407 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 27,111 Reputation points Microsoft Employee
    2021-07-15T15:04:01.927+00:00

    Hi @azure ,

    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?

    0 comments No comments