- UI type: Angular / MVC / Blazor
- DB provider: EF Core / SQL Server I have deployed my angular+dotnetcore app into IIS. You can find the public link here http://116.90.234.198:8080/ , Home, FAQ, Report a Bug are being browsed as they are angular page but if i click on login it is not being routed. However if i type the url http://116.90.234.198:8080/account/login i can browse it. My HTTP Api Module is as follows
23 Answer(s)
-
0
Hello,
Since you are not using HTTPS yet, you need to set
requireHttps
tofalse
inenvironment.prod.ts
as follows:export const environment = { // ... oAuthConfig: { // ... requireHttps: false }, // ... } as Config.Environment;
-
0
-
0
Could you share the logs of the request to see why it has failed?
-
0
Please find the logs in the link https://drive.google.com/file/d/1N0hRV1y2P2V4nyyJHNQl8O824wyQ5tyX/view?usp=sharing
-
0
The log states that you have not set redirect uri properly.
Invalid redirect_uri: http://116.90.234.198:8080 {"ClientId":"BMP_App","ClientName":"BMP_App","RedirectUri":null,"AllowedRedirectUris":["http://localhost:4200"]
-
0
-
0
That's config file for angular application. You need to edit redirect uri in
appsettings.json
. -
0
I couldnt find that key in appsettings.json. Kindly provide a doc or example of the same.
-
0
Can i have an update please- still my error is** An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set.**
-
0
Hi @devraj.np@gmail.com, does your problem can be related with https://support.abp.io/QA/Questions/1009/Invalid-redirecturi---RedirectAllowedUrls-on-Login-page?
-
0
Hi , I have already done that but it's not working. Actually non of my deployement is working in IIS, i also have other mvc prroject deployed but error is same. this error was from angular +dotnetcore. Please provide me remote support to sort it out, im in a bit of trobule since has been pending for some time.
-
0
Hi, did you add the url
http://116.90.234.198:8080
into the RedirectAllowedUrls section of your package.json file? (in HttpApi.Host project){ "App": { "SelfUrl": "https://localhost:44326", "AngularUrl": "http://localhost:4200", "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,http://116.90.234.198:8080", "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307,http://116.90.234.198:8080" }, //... }
Also add this url to CorsOrigins section.
-
0
-
0
Does the error still same?
Btw, you should specify the SelfUrl as your HttpApi.Host url not Angular project url.
-
0
My Angular and API are are hosted in the same node in the IIS - so do i have to keep the angular url empty ? I tried removing the key it doesn't work.
-
0
I used to recieve remote support previously - why is this time support is not paying attention and not trying to solve the problems. i already know these answers.
-
0
My Angular and API are are hosted in the same node in the IIS - so do i have to keep the angular url empty ? I tried removing the key it doesn't work.
No, they both need to be the same then.
Did you change your appsettings.json when migrating the database (in DbMigrator project)?
{ "ConnectionStrings": { "Default": "Server=localhost;Database=MyApp;Trusted_Connection=True" }, "IdentityServer": { "Clients": { //... "MyProjectName_App": { "ClientId": "MyProjectName_App", "RootUrl": "http://116.90.234.198:8080" //change root url }, //... } } }
-
0
-
0
Have been waiting on this!
-
0
Have been waiting on this!
We have discussed your problem and it looks like this article may solve your issue.
Could you please try it out and post the results?
-
0
2021-11-20 12:08:28.756 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:08:28.792 +05:45 [ERR] Connection ID "16645304232961901151", Request ID "80000260-0002-e700-b63f-84710c7967bb": An unhandled exception was thrown by the application. System.Threading.Tasks.TaskCanceledException: A task was canceled. at Volo.Abp.Threading.SemaphoreSlimExtensions.LockAsync(SemaphoreSlim semaphoreSlim, CancellationToken cancellationToken) at Volo.Abp.Caching.DistributedCache
2.GetOrAddAsync(TCacheKey key, Func
1 factory, Func1 optionsFactory, Nullable
1 hideErrors, Boolean considerUow, CancellationToken token) at Volo.Abp.LanguageManagement.DatabaseLanguageProvider.GetLanguagesAsync() at Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync() at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync() 2021-11-20 12:08:38.951 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:08:48.976 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:08:58.989 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:09:09.002 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:09:19.015 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:09:29.028 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:09:39.042 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:09:49.071 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:09:59.084 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:10:09.097 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:10:19.110 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) 2021-11-20 12:10:29.124 +05:45 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BMP Health Status. System.InvalidOperationException: An invalid request URI was provided. The request URI must either 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) at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration) -
0
-
0
Hi,
Have tried to configure your web.config like following topic: https://stackoverflow.com/a/44473484/7200126