Open Closed

Failed to load resource: net::ERR_CONNECTION_REFUSED #6395


0
muleso created

On localhost it works fine, on a Azure VM i get this error. Swagger Authorize, when i try to log in

image.png


6 Answer(s)
  • 0
    maliming created

    On the Anzure VM you should change the IP or domain name to access the api.

  • 0
    muleso created

    Hello,

    How ?

  • 0
    ismcagdas created

    Hi @muleso

    You need to change your app's url in the appsettings.json (or appsettings.Production.json if you are deployed ot prod environment).

  • 0
    muleso created

    Worked.

  • 0
    kalidarscope created

    I am also getting same error. I have deployed in IIS(Port no: 2020).My appsettings.json

     "ConnectionStrings": {
        "Default": "Server=DESKTOP-KSUS4BB\\PRO; Initial Catalog=PRODb;User ID=sa;Password=password@123"
      },
      "AbpZeroLicenseCode": "LicenseCodePlaceHolderToReplace",
      "Abp": {
        "RedisCache": {
          "ConnectionString": "localhost",
          "DatabaseId": -1
        }
      },
      "App": {
        "ServerRootAddress": "http://localhost:22742/",
        "ClientRootAddress": "http://localhost:4200/",
        "CorsOrigins": "http://*.mycompany.com,http://localhost:4200,http://localhost:2020/",
        "SwaggerEndPoint": "/swagger/v1/swagger.json",
        "AllowAnonymousSignalRConnection": "true"
      },
    

    My appsettings.Production.json

    {
      "ConnectionStrings": {
      
         "Default": "Server=DESKTOP-KSUS4BB\\PRO; Initial Catalog=PRODb;User ID=sa;Password=password@123"
      },
      "App": {
        "ServerRootAddress": "http://localhost:9901/",
        "ClientRootAddress": "http://localhost:4200/",
        "CorsOrigins": "http://localhost:2020/"
      }
    }
    
  • 0
    maliming created

    @kalidarscope

    You should not use the address of http://localhost:xxxx when you deploy the app.