Skip to content

StyleTransferDemo fails to get model with .NET 5.0. #2

@KennethEvans

Description

@KennethEvans

When running it out of the box but converted to .NET 5.0, it downloaded the model ("https://www.cntk.ai/Models/Caffe_Converted/VGG19_ImageNet_Caffe.model") but it had 0 size. The problem is apparently a certificate error. I fixed it by adding the lines

                // There is a Certificate error.  This fixes it by bypassing the check
                System.Net.ServicePointManager.ServerCertificateValidationCallback += 
                    (send, certificate, chain, sslPolicyErrors) => { return true; };

before client.DownloadFileAsync in StartDownload.

There may be better ways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions