Git Product home page Git Product logo

Comments (5)

rytmis avatar rytmis commented on June 12, 2024 2

There's a fair chance, that this error happens, because the API server no longer responds to obsolete TLS versions, and your app is running with defaults that try an older version of TLS.

Try adding this somewhere around the startup code of your app:

        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

from learn.forge.viewmodels.

augustogoncalves avatar augustogoncalves commented on June 12, 2024

just to be clear, your question is about 3-legged, but this is the 2-legged tutorial code...right?

about the problem, it is probably happening due TLS migration, please check

https://forge.autodesk.com/blog/upcoming-forge-system-upgrade-tls-12-upgrade-date-moved-oct-31
https://forge.autodesk.com/blog/tls-12-net-developers
https://forge.autodesk.com/blog/tls-12-nodejs-developers

from learn.forge.viewmodels.

sherbert18 avatar sherbert18 commented on June 12, 2024

Here is the function that I am getting the error in. Is this 3-legged Authentication?

[HttpGet]
[Route("api/forge/oauth/url")]
public string GetOAuthURL()
{
// prepare the sign in URL
Scope[] scopes = { Scope.DataRead };
ThreeLeggedApi _threeLeggedApi = new ThreeLeggedApi();
string oauthUrl = _threeLeggedApi.Authorize(
Credentials.GetAppSetting("FORGE_CLIENT_ID"),
oAuthConstants.CODE,
Credentials.GetAppSetting("FORGE_CALLBACK_URL"),
new Scope[] { Scope.DataRead, Scope.ViewablesRead });

  return oauthUrl;
}

from learn.forge.viewmodels.

augustogoncalves avatar augustogoncalves commented on June 12, 2024

I just downloaded the source for 3-legged (which is NOT this repo) and compiled with VS2017, works fine. Please make sure to Rebuild the project.

https://github.com/Autodesk-Forge/learn.forge.viewhubmodels/archive/net.zip

from learn.forge.viewmodels.

edipof avatar edipof commented on June 12, 2024

There's a fair chance, that this error happens, because the API server no longer responds to obsolete TLS versions, and your app is running with defaults that try an older version of TLS.

Try adding this somewhere around the startup code of your app:

        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

This worked for me. Thanks :)

from learn.forge.viewmodels.

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.