Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Failed to load resource: net::ERR_CONNECTION_REFUSED #6395


User avatar
0
muleso created

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


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

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

  • User Avatar
    0
    muleso created

    Hello,

    How ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    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).

  • User Avatar
    0
    muleso created

    Worked.

  • User Avatar
    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/"
      }
    }
    
  • User Avatar
    0
    maliming created
    Support Team

    @kalidarscope

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