Giter Site home page Giter Site logo

Comments (10)

hovsepm avatar hovsepm commented on August 17, 2024

From @jianghaolu on May 2, 2017 19:3

I'll add support for this in the next release.

from azure-libraries-for-net.

hovsepm avatar hovsepm commented on August 17, 2024

From @jianghaolu on June 14, 2017 21:19

This is supported in v1.1.0.

from azure-libraries-for-net.

hovsepm avatar hovsepm commented on August 17, 2024

From @j055 on June 20, 2017 17:26

How do we use this? I tried the following:

           _webApp.Update()
                .WithClientCertEnabled(true)
                .DefineHostnameBinding()
                .WithThirdPartyDomain(domain)
                .WithSubDomain(subDomain)
                .WithDnsRecordType(CustomHostNameDnsRecordType.CName)
                .Attach()
                .Apply();

ALL CERTIFICATES stop working in the site including site.azurewebsites.net. The browser presents a 'Select a Certificate' dialog with 403 error saying the site is stopped when in fact it isn't:

diag

The Azure portal shows everything working normally even though the certs are broken.

The WebApp needs deleting and recreating to fix it.

from azure-libraries-for-net.

hovsepm avatar hovsepm commented on August 17, 2024

@jianghaolu please followup with the sample link.

from azure-libraries-for-net.

hovsepm avatar hovsepm commented on August 17, 2024

From @j055 on June 26, 2017 15:52

This is easily reproducible:

  1. Create a web app (I used a basic app service plan)
  2. Add a CName record in your DNS to point to myapp.azurewebsites.net
  3. Execute the following:
	webApp.Update()
				.WithClientCertEnabled(true)
				.DefineHostnameBinding()
				.WithThirdPartyDomain("mydomain.com")
				.WithSubDomain("test1")
				.WithDnsRecordType(CustomHostNameDnsRecordType.CName)
				.Attach()
				.Apply();

The site now returns HTTP 403 forbidden.

from azure-libraries-for-net.

hovsepm avatar hovsepm commented on August 17, 2024

From @Dona278 on September 6, 2017 15:22

@j055 To add a certificate binding to an existing web app i used:

await azure.WebApps.Inner
       .CreateOrUpdateHostNameBindingAsync(
                RESOURCE_GROUP_NAME,
                WEB_APP_NAME,
                EXISTING_BINDED_TO_WEB_APP_HOSTNAME,
                new HostNameBindingInner(
                      azureResourceType: AzureResourceType.Website,
                      hostNameType: HostNameType.Verified,
                      customHostNameDnsRecordType: CustomHostNameDnsRecordType.CName // or A depends on the type of hostname,
                      sslState: SslState.SniEnabled,
                      thumbprint: CERTIFICATE_THUMBPRINT));

from azure-libraries-for-net.

hovsepm avatar hovsepm commented on August 17, 2024

From @j055 on October 2, 2017 10:4

@Dona278. Thanks. in v1.3 CreateOrUpdateHostNameBindingAsync changed to CreateOrUpdateHostNameBindingWithHttpMessagesAsync

await azure
    .WebApps
    .Inner
    .CreateOrUpdateHostNameBindingWithHttpMessagesAsync(
        resourceGroupName, 
        webAppName, 
        domain,
		new HostNameBindingInner(
                    azureResourceType: AzureResourceType.Website,
                    hostNameType: HostNameType.Verified,
                    customHostNameDnsRecordType: CustomHostNameDnsRecordType.CName,
                    sslState: SslState.SniEnabled,
                    thumbprint: thumbprint));

from azure-libraries-for-net.

Tealons avatar Tealons commented on August 17, 2024

This one helped! Thanks!

from azure-libraries-for-net.

jianghaolu avatar jianghaolu commented on August 17, 2024

This is now supported in 1.14.0 release through https://github.com/Azure/azure-libraries-for-net/blob/master/src/ResourceManagement/AppService/Domain/HostNameSslBinding/Definition/IDefinition.cs#L109.

from azure-libraries-for-net.

glaidler avatar glaidler commented on August 17, 2024

Hi, sorry but I can't follow the specifc fluent code I need to execute this.. I have tried:

_azure.WebApps.GetById(AppInstanceId).Update()
.WithThirdPartyHostnameBinding(domain).DefineSslBinding().ForHostname(domain)
.WithExistingCertificate(thumbprint).WithSniBasedSsl().Attach();

But this does not work. Can anyone supply code that works against the interface defined by @jianghaolu

from azure-libraries-for-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.