The following forum(s) have migrated to Microsoft Q&A (Preview): Azure App Service - API Apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
Certificate URI RRS feed

  • Question

  • In the new gRPC services with ASP.NET Core documentation, it indicates that I need in code to provide the path to the certificate and the password. In a Azure App Service environment, I assume that it would be the .PFX used in the SSL/TSL binding. If so, is it the "Key Vault Resource Url" with the "Valid Certificate Name? What is used as the password?

    The following is the sample code in the article.

    public static IHostBuilder CreateHostBuilder(string[] args) => 
        Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults(webBuilder =>
    {
        webBuilder.ConfigureKestrel(options => 
        {
            //This endpoint will use HTTP/2 & HTTPS on port 5001.
            options.Listen(IPAddress.Any, 5001, listenOptions =>
            { 
                listenOptions.Protocols = HttpProtocols.Http2;
                listenOptions.UseHttps("<path to .pfx file>",  "<certificate password>");
            });
        });
    
        webBuilder.UseStartup<Startup>();
    });

    Friday, September 6, 2019 12:04 AM

Answers