Hi @maliming,
After taking a closer look, I have found that same api is returning the 200 Ok response before login, But after login it started throwing 500 error.
Please have a look at attached image of headers. We can see that allow cors origin is not adding in header after login. Please help me.
Hello @maliming
2022-07-25 22:25:49.525 -07:00 [INF] Hosting environment: Production
2022-07-25 22:25:49.525 -07:00 [INF] Content root path: C:\inetpub\wwwroot
2022-07-25 22:25:49.559 -07:00 [ERR] GetHealthReport threw an exception when trying to get report from https://api.ubxcloud.net/health-status configured with name UBX_Client_Angular Health Status.
System.Net.Http.HttpRequestException: No such host is known. (api.ubxcloud.net:443)
---> System.Net.Sockets.SocketException (11001): No such host is known.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 96
2022-07-25 22:25:51.030 -07:00 [INF] CORS policy execution failed.
2022-07-25 22:25:51.030 -07:00 [INF] Request origin http://10.9.100.101 does not have permission to access the resource.
2022-07-25 22:25:51.450 -07:00 [INF] CORS policy execution successful.
2022-07-25 22:25:51.746 -07:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration
2022-07-25 22:25:52.209 -07:00 [INF] Request finished HTTP/2 GET https://api.ubxcloud.net/.well-known/openid-configuration - - - 200 - application/json;+charset=UTF-8 2786.4676ms
2022-07-25 22:25:52.487 -07:00 [INF] Request starting HTTP/2 GET https://api.ubxcloud.net/.well-known/openid-configuration/jwks - -
2022-07-25 22:25:52.491 -07:00 [INF] CORS policy execution failed.
2022-07-25 22:25:52.491 -07:00 [INF] Request origin http://10.9.100.101 does not have permission to access the resource.
2022-07-25 22:25:52.499 -07:00 [INF] CORS policy execution successful.
2022-07-25 22:25:52.514 -07:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryKeyEndpoint for /.well-known/openid-configuration/jwks
2022-07-25 22:25:52.527 -07:00 [INF] Request finished HTTP/2 GET https://api.ubxcloud.net/.well-known/openid-configuration/jwks - - - 200 - application/json;+charset=UTF-8 39.7694ms
2022-07-25 22:25:52.847 -07:00 [INF] Request starting HTTP/2 GET https://api.ubxcloud.net/api/abp/application-configuration - -
2022-07-25 22:25:52.848 -07:00 [INF] CORS policy execution failed.
2022-07-25 22:25:52.848 -07:00 [INF] Request origin http://10.9.100.101 does not have permission to access the resource.
2022-07-25 22:25:52.852 -07:00 [INF] No CORS policy found for the specified request.
2022-07-25 22:25:52.896 -07:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2022-07-25 22:25:52.914 -07:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
2022-07-25 22:25:53.589 -07:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
2022-07-25 22:25:53.626 -07:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 706.6509ms
2022-07-25 22:25:53.626 -07:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2022-07-25 22:25:54.193 -07:00 [INF] Request finished HTTP/2 GET https://api.ubxcloud.net/api/abp/application-configuration - - - 200 - application/json;+charset=utf-8 1345.9654ms
2022-07-25 22:25:59.852 -07:00 [INF] Start processing HTTP request GET "https://api.ubxcloud.net/health-status"
2022-07-25 22:25:59.852 -07:00 [INF] Sending HTTP request GET "https://api.ubxcloud.net/health-status"
2022-07-25 22:25:59.855 -07:00 [ERR] GetHealthReport threw an exception when trying to get report from https://api.ubxcloud.net/health-status configured with name UBX_Client_Angular Health Status.
System.Net.Http.HttpRequestException: No such host is known. (api.ubxcloud.net:443)
---> System.Net.Sockets.SocketException (11001): No such host is known.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 96
2022-07-25 22:25:59.860 -07:00 [INF] Notification is sent on same window time.
Hello,
I have deployed the abp .NET api application on windows server IIS. and abp Angular Application on Linux server using nginx and When I try to run and login in web. I input credentials username and password and click login button I show error
10.9.100.101/:1 Access to XMLHttpRequest at 'https://api.ubxcloud.net/api/abp/application-configuration' from origin 'http://10.9.100.101' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Thanks
Hi,
You can check this: https://support.abp.io/QA/Questions/3327/#answer-51baf847-087a-2aa1-1d76-3a04d9420894
hi
This code is working for me.
Thank you
Hi
I can try this code
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";
});
error:
2022-07-20 03:39:56.518 -07:00 [FTL] Application startup exception
Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module UBX_Client_Angular.UBX_Client_AngularHttpApiHostModule, UBX_Client_Angular.HttpApi.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: The value for customized path can't be null and need to start with / character. (Parameter 'ApiPath'). See the inner exception for details.
---> System.ArgumentException: The value for customized path can't be null and need to start with / character. (Parameter 'ApiPath')
at Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.<>c.<EnsureValidApiOptions>b__1_0(String path, String argument) in /_/src/HealthChecks.UI/Extensions/EndpointRouteBuilderExtensions.cs:line 63
at Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.EnsureValidApiOptions(Options options) in /_/src/HealthChecks.UI/Extensions/EndpointRouteBuilderExtensions.cs:line 59
at Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapHealthChecksUI(IEndpointRouteBuilder builder, Action`1 setupOptions) in /_/src/HealthChecks.UI/Extensions/EndpointRouteBuilderExtensions.cs:line 17
at UBX_Client_Angular.HealthChecks.HealthChecksBuilderExtensions.<>c__DisplayClass2_0.<MapHealthChecksUiEndpoints>b__1(EndpointRouteBuilderContext endpointContext) in D:\Projects\UBX\aspnet-core\src\UBX_Client_Angular.HttpApi.Host\HealthChecks\HealthChecksBuilderExtensions.cs:line 67
at Microsoft.AspNetCore.Builder.AbpAspNetCoreApplicationBuilderExtensions.<>c__DisplayClass0_0.<UseConfiguredEndpoints>b__0(IEndpointRouteBuilder endpoints)
at Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action`1 configure)
at Microsoft.AspNetCore.Builder.AbpAspNetCoreApplicationBuilderExtensions.UseConfiguredEndpoints(IApplicationBuilder app, Action`1 additionalConfigurationAction)
at UBX_Client_Angular.UBX_Client_AngularHttpApiHostModule.OnApplicationInitialization(ApplicationInitializationContext context) in D:\Projects\UBX\aspnet-core\src\UBX_Client_Angular.HttpApi.Host\UBX_Client_AngularHttpApiHostModule.cs:line 279
at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)
at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
--- End of inner exception stack trace ---
at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
at Volo.Abp.AbpApplicationBase.InitializeModules()
at Volo.Abp.AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)
at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplication(IApplicationBuilder app)
at UBX_Client_Angular.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) in D:\Projects\UBX\aspnet-core\src\UBX_Client_Angular.HttpApi.Host\Startup.cs:line 17
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Server.IIS.Core.IISServerSetupFilter.<>c__DisplayClass2_0.<Configure>b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at UBX_Client_Angular.Program.Main(String[] args) in D:\Projects\UBX\aspnet-core\src\UBX_Client_Angular.HttpApi.Host\Program.cs:line 32
thanks
hi,
I faced error
2022-07-20 02:52:34.184 -07:00 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name UBX_Client_Angular 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 System.Net.Http.HttpClient.CheckRequestBeforeSend(HttpRequestMessage request) at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 96
Hello,
I try deploy my .Net 6.0 web API application (ABP Framework) on windows server IIS. when I browse it as http://mywebsite.com or https://mywebsite.com:44388, I get the following errors:
2)
Most likely causes: •The website is under maintenance. •The website has a programming error.
please help for fix this error
Thanks
Hello
I deploy angular project on server, some file size is too large.
How to radius *.js and style.css file too large size on deploy angular project?
Thanks
Hello,
Can please help me with deploying API project on linux?
I was under impression that we are using .NetCore but when I have checked the property of the project it is .Net 6.0. I am not sure If we can host the api project on linux.
If we can have still option to host the application on linux server, please provide me the document link to follow. I am badly need it and host the application ASAP.
And, if its not possible please let me know, so I can ask to client for the windows server. But client's first preference is linux.
Thanks.