I am trying to redirect to a page in my OnPost method but the page never appears. The call to the RedirectToPage() doesn't throw an exception but in the logs this is what I get: 2022-12-29 14:32:15.195 -06:00 [INF] Request finished HTTP/2 POST https://localhost:44386/TenantRequests/CreateModal application/x-www-form-urlencoded;+charset=UTF-8 476 - 302 - - 645.5495ms 2022-12-29 14:32:15.198 -06:00 [INF] Request starting HTTP/2 GET https://localhost:44386/PatriotPayment - - 2022-12-29 14:32:15.444 -06:00 [INF] Executing endpoint '/PatriotPayment/Index' 2022-12-29 14:32:15.451 -06:00 [INF] Route matched with {page = "/PatriotPayment/Index", area = "", action = "", controller = ""}. Executing page /PatriotPayment/Index 2022-12-29 14:32:15.451 -06:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2022-12-29 14:32:15.724 -06:00 [INF] Executing an implicit handler method - ModelState is "Valid" 2022-12-29 14:32:15.724 -06:00 [INF] Executed an implicit handler method, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult. 2022-12-29 14:32:15.752 -06:00 [DBG] Added bundle 'Lepton.Global' to the page in 16.40 ms. 2022-12-29 14:32:15.754 -06:00 [INF] Authorization failed. These requirements were not met: PermissionRequirement: SettingManagement.Emailing 2022-12-29 14:32:15.754 -06:00 [INF] Authorization failed. These requirements were not met: PermissionRequirement: AbpIdentity.SettingManagement 2022-12-29 14:32:15.755 -06:00 [INF] Authorization failed. These requirements were not met: PermissionRequirement: LeptonThemeManagement.Settings 2022-12-29 14:32:15.755 -06:00 [INF] Authorization failed. These requirements were not met: PermissionRequirement: AbpAccount.SettingManagement 2022-12-29 14:32:15.872 -06:00 [DBG] Added bundle 'Lepton.Global' to the page in 112.99 ms. 2022-12-29 14:32:15.873 -06:00 [INF] Executed page /PatriotPayment/Index in 422.6334ms 2022-12-29 14:32:15.874 -06:00 [INF] Executed endpoint '/PatriotPayment/Index' 2022-12-29 14:32:15.874 -06:00 [INF] Request finished HTTP/2 GET https://localhost:44386/PatriotPayment - - - 200 - text/html;+charset=utf-8 675.7313ms The TenantRequests/CreateModal is the page that calls RedirectToPage("/PatriotPayment"). A shown, the ModelState is valid and eventually I get a 200 result but the page never shows. There is a set of Authorization failed errors that always show up that doesn't make any sense to me. There is no authorization on the page as it is a plain .cshtml file with no calls to backend processes.
The OnPost() method is simple:
public async Task<IActionResult> OnPostAsync()
{
try
{
await _tenantRequestsAppService.CreateAsync(TenantRequest);
return RedirectToPage("/PatriotPayment/Index");
}
catch(Exception ex)
{
Debug.WriteLine(ex);
return NoContent();
}
and the .cshtml of the page that is being called is also simple:
@page
@using PatriotTracker.Web.Pages.TenantRequests
@using PatriotTracker.Web.Menus
@using Microsoft.AspNetCore.Mvc.Localization
@using PatriotTracker.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@inject IHtmlLocalizer<PatriotTrackerResource> L
@inject IPageLayout PageLayout
@model PatriotTracker.Web.Pages.TenantRequests.SubmitPaymentModel
@{
}
<abp-card id="TenantRequestSubmitPayment">
<abp-card-body>
<h3>Payment for your subscription is $50.00 / month. If you agree with this purchase, click the "Purchase" button.</h3>
<form id="SubscribeForm" autocomplete="off" method="post">
<div class="col-12" style="align-content:center">
<abp-button button-type="Primary" type="submit" text="Purchase"/>
</div>
</form>
</abp-card-body>
</abp-card>
I've tried several different Redirect methods and they all seem to result in the same issue. Any assistance is appreciated.
I am trying to integrate Stripe Payments in to my app and struggling to get things working. I have added the Volo Payment module to my app and put in the correct keys in the appsettings.json file for my Stripe account and webhook settings. I have two main problems:
The first is just getting the payment request for a subscription plan created in Stripe. Using the code sample in the documentation I modified the name and PlanId to match my subscription name and the PlanId GUID that I have in the database for the GateWayPlan. Here is the error I get when it goes to the redirect statement: An unhandled exception occurred while processing the request. StripeException: Not a valid URL Stripe.StripeClient.ProcessResponse<T>(StripeResponse response)
Stack Query Cookies Headers Routing
StripeException: Not a valid URL
Stripe.StripeClient.ProcessResponse<T>(StripeResponse response)
Stripe.StripeClient.RequestAsync<T>(HttpMethod method, string path, BaseOptions options, RequestOptions requestOptions, CancellationToken cancellationToken)
Stripe.Service<TEntityReturned>.RequestAsync<T>(HttpMethod method, string path, BaseOptions options, RequestOptions requestOptions, CancellationToken cancellationToken)
Volo.Payment.Stripe.StripePaymentGateway.StartAsync(PaymentRequest paymentRequest, PaymentRequestStartInput input)
Volo.Payment.Requests.PaymentRequestAppService.StartAsync(string gateway, PaymentRequestStartDto inputDto)
Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo)
Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue<TResult>.ProceedAsync()
Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter<TInterceptor>.InterceptAsync<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task<TResult>> proceed)
Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo)
Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue<TResult>.ProceedAsync()
Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter<TInterceptor>.InterceptAsync<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task<TResult>> proceed)
Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo)
Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue<TResult>.ProceedAsync()
Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter<TInterceptor>.InterceptAsync<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task<TResult>> proceed)
Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo)
Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue<TResult>.ProceedAsync()
Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter<TInterceptor>.InterceptAsync<TResult>(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func<IInvocation, IInvocationProceedInfo, Task<TResult>> proceed)
Volo.Payment.Stripe.Pages.Payment.Stripe.PrePaymentModel.OnPostAsync()
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory+NonGenericTaskHandlerMethod.Execute(object receiver, object[] arguments)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension+<>c__DisplayClass0_0+<<UseJwtTokenMiddleware>b__0>d.MoveNext()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
If I can get some direction on how to resolve this error and what additional pages I need to create in my app to successfully handle the subscription creation process I would appreciate it.
The second issue is with the webhook. Because this is a subscription I need to have the webhook monitor payment and cancellation activity and have code in my app to handle each event type. I have tried to execute stripe events in my local environment using Stripe's tool that generates stripe events and sends them to my local instance. There isn't any good documentation that I have found that addresses what URL to use for the webhook address or how to hook into the events that would be generated. Please provide some direction on these two webhook issues also.
In addition to the entries in the Payment section of the appsettings.json file for stripe, I also have a section for PaymentWebOptions as follows:
"PaymentWebOptions": {
"CallBackUrl": "http://localhost:44386/patriotpayment/success",
"RootUrl": "http://localhost:44386",
"PaymentGatewayWebConfigurationDictionary": {
"Name": "Stripe",
"PrePaymentUrl": "http://localhost:44386/patriotpayment",
"PostPaymentUrl": "http://localhost:44386/patriotpayent/success",
"ExtraInfos": "Club Name"
}
These are the settings I use when running locally.
I have a MAUI project as part of my overall solution that includes a web app, the API and the MAUI mobile solution. We are still using IdentityServer as the authenticator. I have the mobile app running and can login successfully but when I try to logout, I am directed to the website and it indicates that I am successfully logged out and will redirect me back to the mobile app but it never does. I have an entry in the IdentityServerClientPostLogoutRedirectUris table for the Maui client, but it does not redirect me back. Can you assist in resolving this issue?
We have created an app (MVC/Razor with SQL Server EntityFramework) that was originally done with abp 5.3.4 that we have upgraded to abp framework 6.0.0-rc4. We tested the conversion locally and have everything working fine. However, when we deployed it to Azure the app fails with an error attempting to initialize the OpenIddict.AbpOpenIddictAspNetCoreModule. The error is:
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: Access Denied
How do we resolve this error?
We are developing an app (web) using 5.3.3 and need to create a mobile app to go along with it. I am anxious to use the MAUI template that is available in the 6.0.0-rc3 (or the official release), but the database structure for identity management and authentication is significantly different in the 6.0.x framework. Is there going to be a good migration path to move from the 5.3.x structure to the 6.0.x structure?
If you're creating a bug/problem report, please include followings:
I created a starter solution that included the MAUI mobile project. On the initial build of the app I get an error (DEP0700: Registration of the app failed [0x80073D1F] Maui_Test.Maui)
If I ignore the error and attempt to run the DBMigrator I get an exception (BusinessRuleException) indicating that there is an invalid Uri. The Uri that is invalid is maui_test://. I put a breakpoint in at the check for the Business Rule Exception and bypass the error and got the DBMigrator to run. However when I try to run the app with either the MAUI project or the Web project as the startup project I get an error saying that the HttpApi.Client.dll cannot be found.
Please tell me what the value should be for the Maui RootUrl in the appsettings.json file and how to get the project to run in Windows.
We are creating a multi-tenant app using ABP.IO Commercial 5.3.3 and a mobile app that will interface with the API. Can we deploy a single version of the mobile app and have it determine the tenant without requiring the user to select it?
I am using abp.io commercial version 5.3.0 in a MVC/Razor application.
We are having issues with the data grid presentation where the headers for the columns don't align with the data. In certain circumstances the headers don't align in a way that makes the headers obviously associated with the columns. In most every case, if the screen is resized the columns of data expand or contract with the re-sizing of the browser, but the headers remain in the same position.
I tried setting the autosize property of the data grid to "true" in one table definition, but when I did that the form failed to process and received an error stating that the style could not be resolved.
In the example above, the columns align with the sorting arrows of the column before it.
In the example above, the screen was re-sized by reducing the browser footprint. As you can see, the columns adjusted but the headers remained in the same position they were and no longer relate the corresponding column.
Please tell me how to resolve these issues.
How do I get to the source code for the OrganizationUnit management screens? I need to change the layout of the UI and can't find a module that contains it or how to modify it. Also is there a good example of how to create a tree view of related data similar to the OrganizationUnit tree?