أنشطة "darutter"

سؤال
  • ABP Framework version: v5.3.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

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.

إجابة

Also, when I attempt to make a webhook call, I get the error that a connection was made but was forcibly closed by the remote host. I need to get the webhook working and understand how to respond to the events that are created by the Payment module.

إجابة

I added the Configure and it took me to the payment page in Stripe. However, once I entered payment info it tried to redirect me to /Payment/Stripe/PostPayment?SessionId=##################

This generated an error page indicating the site can't be reached. What else am I missing?

Again, the documentation on the pieces you need to have in place is very sparse.

سؤال
  • ABP Framework version: v5.3.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC): no

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.

  • ABP Framework version: v5.3.4 or 6.0.0-rc-4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

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?

إجابة

The above errors occur when I don't have the PublishTrimmed property in the .csproj file. If I put the property in the .csproj file and set the value to false I get this error:

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.447/targets/Xamarin.Shared.Sdk.targets(3,3): Error: iOS projects must build with PublishTrimmed=true. Current value: false. (BCFOAssistant.Maui)

سؤال

Using abp version 6.0.0-rc.4 I created a new project with a MAUI mobile app template. The project appears to create successfully, but when I try to run the MAUI project in debug mode I get the errors that are attached

Please let me know how to resolve these errors.

سؤال

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?

إجابة

Go to abp suite and launch version 6.0.0-rc3. Select Create New Solution Give it a name, MVC, SQL Server/Entity Framework, MAUI and enter connection string. Click "save" NOTE: the command window indicates everything worked, but suite indicates "Invalid directory" error on close. Open new project in Visual Studio Set DBMigrator as startup project Run Throws BusinessRuleException on invalid redirectUri Bypass check for maui:// URI DBMigrator completes and tables are created and populated

عرض 71 الي 80 من 94 إدخالات
Made with ❤️ on ABP v8.2.0-preview Updated on مارس 25, 2024, 15:11