All of my .json files have problems loading reference/schema from schemastore.azurewebsites.net

后端 未结 11 1465
春和景丽
春和景丽 2021-02-05 00:06

I\'m working in VS Code and started getting this error yesterday. All of my json files have this error, not just a few. If I remember right there was an update to the program

11条回答
  •  故里飘歌
    2021-02-05 00:26

    After banging my head against this for longer than I care to admit, I just needed to add the proxyAuthorization value for my Base64 encoded credentials, and did not need the proxy or proxyStrictSSL values.

    I already had my proxy correctly configured in my environment variables. It only has the domain and port, not my credentials, ex. "HTTP_PROXY" "http://example.com:port/".

    I used this C# code in LINQPad to get the proxyAuthorization value from my credentials:

    var pw = "user@example.com:password";
    var base64Encoded = Convert.ToBase64String(Encoding.UTF8.GetBytes(pw));
    base64Encoded.Dump();
    

    This is what I have in my user settings.json, using the encoded string from the above code dump.

    "http.proxyAuthorization": "BASE64_ENCODED_VALUE"
    

    Note: I believe that if I didn't need the full username with email address in the credentials for our proxy to let me out, I could have used an above solution. But since I did, this was the only way I could get it to work.

提交回复
热议问题