we didn't use pop up modal.we have requirements of displaying success msg and redirect to index page when submitting form successfully.since we r not using pop up modal ,couldn't use javascript to display abp.msg.success.
OnPost(.CS)
public async Task <IActionResult> OnPostAsync() {
var files = Documents;
var purchaseOrder = PurchaseOrder;
purchaseOrder.StatusName = _settings.StatusSetting.Open;
//Validate
var validateResult = purchaseOrder.Validate();
if (!validateResult.IsSuccess) {
throw new UserFriendlyException("Model is not valid");
}
foreach(var fileExtension in files) {
if (!fileExtension.ContentType.Contains("pdf") && !fileExtension.ContentType.Contains("doc") && !fileExtension.ContentType.Contains("docx") && !fileExtension.ContentType.Contains("msword")) {
throw new UserFriendlyException("File is not in valid format");
}
}
var result = await _purchaseOrdersAppService.CreateAsync(PurchaseOrder);
if (files != null && files.Count() > 0) {
foreach(var file in files) {
var documentsPath = _blobStorage.UplodPurchaseOrderFile(file, result.Id).Result;
var documentInput = new DocumentCreateDto {
FileName = file.FileName,
FilePath = documentsPath,
FileSize = (int) file.Length,
FileType = file.ContentType,
RecordId = result.Id,
TypeName = _settings.DocTypeSetting.PurchaseOrder
};
await _documentAppService.CreateAsync(documentInput);
}
}
return Redirect("/PurchaseOrders");
}
Hi,
we have product page with tree view( for category) and tax details table .we couldn't get selected element ids with default OnPOST ,so we use ajax call to send data to another OnPOSTSAVE methods.For your reference, JS on form submit event we call ajax
CS(Razor page)
Here line no 126 throws Operation cancelled exception so UpdateAsync in ProductAppService not hittng
Exception
at System.Net.Http.HttpConnection.<SendAsyncCore>d__56.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Net.Http.HttpConnectionPool.<SendWithRetryAsync>d__72.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.RedirectHandler.<SendAsync>d__4.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.DiagnosticsHandler.<SendAsyncCore>d__5.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendAsync>d__5.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>d__5.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpClient.<SendAsyncCore>d__85.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.<MakeRequestAsync>d__42.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.<MakeRequestAndGetResultAsync>d__41`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.<GetResultAsync>d__40.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.<InterceptAsync>d__39.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.<InterceptAsync>d__3`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Castle.DynamicProxy.AsyncInterceptorBase.<ProceedAsynchronous>d__14`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.<ProceedAsync>d__7.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Volo.Abp.Validation.ValidationInterceptor.<InterceptAsync>d__2.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.<InterceptAsync>d__3`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at GenieERP.Web.Pages.Products.EditModalModel.<OnPostSaveProductAsync>d__38.MoveNext() in E:\Projects\GenieERP\GenieERP\src\GenieERP.Web\Pages\Products\EditModal.cshtml.cs:line 126
**Note: This ajax call working fine when creating new product but we got this issue only in updating product **
If you're creating a bug/problem report, please include followings:
Hi,
when clicking preview button ,need to preview form and print(if required) as pdf.
Preview should be in this format
Can u pls suggest idea's to implement this?
Hi ,
This is our code to redirect web page to dashboard.This is working fine in local.But we get internal server error when site gets published.
Hi,
we have added state entity to organization unit by referring this https://support.abp.io/QA/Questions/295/Extending-Abp-entities-by-adding-navigation-properties
Now we want to override organization unit create/edit page to display StateLookupList ?
Hi,
we redirect to page instead of opening popup modal(for create and edit).
In create/edit screen ,we have cancel and save button.After clicking save button,we want to redirect to index page.
we tried to redirect in OnPost method but not working.
Hi,
our developer arunm@genixtec.com couldn't able to login in abp.
It shows invalid username and password when trying to login.
It shows invalid token when trying to reset password.
Hi, Forgot password is not working in our abp application.If we enter our email,we get this message but we didn't get reset code/link in mail.We are using smtp settings.This Smtp settings works well in other .net core application .But in abp framework ,it is not working.
Thanks
For new product screen, we didn't use popup modal.we have requirements of redirecting to another page.For that we use anchor tag href.
Now for edit product screen, how to redirect to page instead of opening popup modal
We have upgraded abp framework from v4.3.3 to v4.4 .After upgrading Host dashboard throws unhandled exception.please solve the issue ASAP!