Open Closed

Struggling to Deploy Angular Application To IIS #2791


User avatar
0
OsmanAmanjee created
  • ABP Framework version: latest

  • UI type: Angular

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes / no

  • Exception message and stack trace: 2022-03-24 14:47:22.685 +02:00 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name Medistat Health Status. System.InvalidOperationException: An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set. at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration)

  • Steps to reproduce the issue:" I've published my host project and copied the contents of the published folder to the server that I'm deploying to. When I try to open swagger to test my services I am presented with the above error. Any idea why I'm getting this error


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

    hi

    Can you share your appsettings.json?

  • User Avatar
    0
    OsmanAmanjee created

    hi

    Can you share your appsettings.json?

    { "App": { "SelfUrl": "https://localhost:44325", "AngularUrl": "http://localhost:4200", "CorsOrigins": "https://.Medistat.com,http://localhost:4200", "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307" }, "Redis": { "Configuration": "127.0.0.1" }, "ConnectionStrings": { "Default": "Server=(local);Database=MedistatABP;Trusted_Connection=false;User ID=MedistatUser;Password=L#vaH4buZ25WjB9", "Discovery": "Server=(local);Database=MedistatDiscovery;Trusted_Connection=false;User ID=MedistatUser;Password=L#vaH4buZ25WjB9", "Edi": "Server=(local);Database=MedistatEdi;Trusted_Connection=false;User ID=MedistatUser;Password=L#vaH4buZ25WjB9", "Msv": "Server=(local);Database=MedistatMsv;Trusted_Connection=false;User ID=MedistatUser;Password=L#vaH4buZ25WjB9" }, "AuthServer": { "Authority": "https://localhost:44325", "RequireHttpsMetadata": "false", "SwaggerClientId": "Medistat_Swagger", "SwaggerClientSecret": "1q2w3e" }, "StringEncryption": { "DefaultPassPhrase": "fsfXFsKSwfobK4Fr" }, "Settings": { "Volo.Abp.LeptonTheme.Style": "Style6", "Volo.Abp.LeptonTheme.Layout.MenuPlacement": "Left", "Volo.Abp.LeptonTheme.Layout.MenuStatus": "AlwaysOpened", "Volo.Abp.LeptonTheme.Layout.Boxed": "False", "Medistat.DiscoveryHPQServiceUrl": "https://test.b2b.services.discovery.co.za/hpq/HealthPolicyQueryService?wsdl", "Medistat.DiscoveryHPQServiceUsername": "medistat-test", "Medistat.DiscoveryHPQServicePassword": "ahUaki7Rwlsz1MaghzuyP", "Medistat.DiscoveryClaimServiceUrl": "https://test.services.discovery.co.za/phisc-oh/IncomingPhiscOHClaims", "Medistat.DiscoveryClaimServiceUsername": "medistat", "Medistat.DiscoveryClaimServicePassword": "jkshi97HgsiJWavDg92gtfZCfrC0UDtby", "Medistat.DiscoveryMedicalAidAdmin": "DISCOVERY", "Medistat.MediswitchWebserviceUrl": "http://wsgateway.mediswitch.co.za/qa/wsgateway/MediswitchGateway", "Medistat.MediswitchPackageCode": "SWITCHON", "Medistat.MediswitchMsvVersionNumber": "119", "Medistat.MediswitchClaimVersionNumber": "118"

    } }

  • User Avatar
    0
    OsmanAmanjee created

    hi

    Can you share your appsettings.json?

    Hi any update on this, I need to deploy this application and I'm not able to see what this issue is

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/issues/700#issuecomment-745881226

  • User Avatar
    0
    OsmanAmanjee created

    hi

    see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/issues/700#issuecomment-745881226

    Hi

    I'm not able to make sense of what is in the forum. I can see that I need to change the url of the health check to be explicit, but I'm not usre where to change it because I dont have any settings for health check in my app config file.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    var healthChecksUiBuilder = services.AddHealthChecksUI(settings =>
    {
        settings.AddHealthCheckEndpoint("MyProjectName Health Status", "https://yourwebsite.com/health-status");
    });
    
    services.MapHealthChecksUiEndpoints(options =>
    {
        options.UIPath = "https://yourwebsite.com/health-ui";
        options.ApiPath = "https://yourwebsite.com/health-api";
    });
    ```
    
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11