Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel Importer : Excel Map columns - Error in web #377

Closed
isatahiri opened this issue Apr 22, 2019 · 32 comments
Closed

Excel Importer : Excel Map columns - Error in web #377

isatahiri opened this issue Apr 22, 2019 · 32 comments
Labels
Bug ExcelImporter Reactive.XAF eXpandFrameowrk/DevExpress.XAF project
Milestone

Comments

@isatahiri
Copy link

Describe the bug
In web client, when i click on excel map i have a error (see attachment).
Error : (translated value)
Asynchronous operations are not allowed in this context. A page that starts an asynchronous operation must have the attribute Async set to true, and an asynchronous operation can only be started on a page before the PreRenderComplete event.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Excel Import record
  2. Select a file
  3. Select Always Create
  4. Click on Excel Map amd see error

ExcelImportError.txt

BR
ISA

@isatahiri
Copy link
Author

Please note that i'm using the version :18.2.704.0

@apobekiaris
Copy link
Member

I guess that you already checked the Page Async=True so you might want to add this setting to your web.config.

  <system.web>
    <httpRuntime targetFramework="4.6.1"/>

let me know if this works please

@apobekiaris apobekiaris added ExcelImporter Reactive.XAF eXpandFrameowrk/DevExpress.XAF project labels Apr 23, 2019
@isatahiri
Copy link
Author

Ok will check that asap and let you know.

I see that you added "Standalone_XAF_Modules" tag. Note that i only installed the 18.2.704.0 with the powershell command. I did not install any other module. (
Am I missing somthing ?

BR
ISA

@apobekiaris
Copy link
Member

ExcelImporter uses the XAF modules and plans are to become one of them.

RequiredModuleTypes.Add(typeof(DevExpress.ExpressApp.SystemModule.SystemModule));
RequiredModuleTypes.Add(typeof(XpandSystemModule));
RequiredModuleTypes.Add(typeof(ValidationModule));
RequiredModuleTypes.Add(typeof(XpandValidationModule));
RequiredModuleTypes.Add(typeof(ConditionalAppearanceModule));
RequiredModuleTypes.Add(typeof(NotificationsModule));
RequiredModuleTypes.Add(typeof(MasterDetailModule));
RequiredModuleTypes.Add(typeof(AutoCommitModule));
RequiredModuleTypes.Add(typeof(ViewEditModeModule));
// RequiredModuleTypes.Add(typeof(SupressConfirmationModule));

@isatahiri
Copy link
Author

"ExcelImporter uses the XAF modules and plans are to become one of them" :
That means taht i have to add "DevExpress.XAF" via nuget to make it work properly ?

@apobekiaris
Copy link
Member

if u install ExcelImporter from nuget this is done already, it nothing more than a dependent assembly treat it like this? let the compiler tell u what it needs else nuget/msbuild are smart enough to handle dependencies.

@isatahiri
Copy link
Author

After checking i had the same issue.
Please see webconfig.

Note also : This appened after upgrading, so nothing changed in my project.
Web.config.txt

I you need the project please let me know.

BR
ISA

@apobekiaris
Copy link
Member

config looks fine, yes please post your project

@isatahiri
Copy link
Author

isatahiri commented Apr 28, 2019

Here we go :
https://1drv.ms/u/s!Amh26IFxNEz6lNd-z8532Xnh6lnxOw

It has been tested with Edge.
The menu is here :
image

@apobekiaris apobekiaris self-assigned this Apr 28, 2019
@apobekiaris
Copy link
Member

image

@apobekiaris apobekiaris removed their assignment Apr 28, 2019
@isatahiri
Copy link
Author

isatahiri commented Apr 28, 2019

Its reactivated : https://1drv.ms/u/s!Amh26IFxNEz6lNd-GqO2E_B9btCzig

Sorry i thought you already took it.

Maybe this is a more precise message :

Exception occurs while assigning the'XpandListView, ID:ExcelImport_ListView' view to WebWindow:
Impossible to start an asynchronous operation at the moment. Asynchronous operations can only be started from a manager or asynchronous module, or during certain events in the page life cycle. If this exception has been removed during the execution of a page, check that it is marked as follows: <%@ Page Async="true" %>. This exception may also indicate an attempt to call an "async void" method, which is not usually supported within ASP.NET request processing. Instead, the asynchronous method must return a task, and the caller must wait for it.

Translated with www.DeepL.com/Translator

@apobekiaris
Copy link
Member

now i got it thnks

@isatahiri
Copy link
Author

ok i'll stop sharing in 15minutes

@apobekiaris
Copy link
Member

feel free to send me private url in my mail, its on my github profile

@apobekiaris
Copy link
Member

but now i have it there is no need

@apobekiaris apobekiaris self-assigned this Apr 28, 2019
@isatahiri
Copy link
Author

Will you deliver 18.2.8 version and include this patch ?
I see that in the lab you are jumping from 18.2.7 to 19.1.

@apobekiaris
Copy link
Member

unfortunately no I do not have infrastructure to support multiple major versions at the moment, let me see whats going on with your project first

@apobekiaris
Copy link
Member

it might be possible to projectconverter and build custom though it should work as there are no breaking changes

@isatahiri
Copy link
Author

yep :-) No worries i'll manage to align with you avalaible versions

@apobekiaris
Copy link
Member

Exception occurs while assigning the'XpandListView, ID:ExcelImport_ListView' view to WebWindow:
Impossible to start an asynchronous operation at the moment. Asynchronous operations can only be started from a manager or asynchronous module, or during certain events in the page life cycle. If this exception has been removed during the execution of a page, check that it is marked as follows: <%@ Page Async="true" %>. This exception may also indicate an attempt to call an "async void" method, which is not usually supported within ASP.NET request processing. Instead, the asynchronous method must return a task, and the caller must wait for it.

from what i see u did not follow this message. the default.aspx declaration should be

<%@ Page Language="C#" AutoEventWireup="true" Inherits="Default" EnableViewState="false"
ValidateRequest="false" CodeBehind="Default.aspx.cs" Async="true" %>

this is a async module.

@apobekiaris apobekiaris removed their assignment Apr 28, 2019
@apobekiaris
Copy link
Member

I did manage to repro the exception in your project and when i used Async="true" i manage to map with no problems

@isatahiri
Copy link
Author

so i should put that in the default.aspx ?

@apobekiaris
Copy link
Member

yeah replace the existing declaration on top of the page

@isatahiri
Copy link
Author

Sorry about that.

I you have my project up, could you test it in winform and let me know if you have the same issue as declared in #379 ?

@expand
Copy link
Member

expand commented May 6, 2019

The DevExpress.XAF repository includes commit System.InvalidOperationException: An asynchronous operation cannot be started at this time #394 #377 that relate to this task. Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use the Xpand.XAF.Modules directly but through an module of the main eXpandFramework module, you may wait for the bot to notify you again.

Thanks a lot for your contribution.

@isatahiri
Copy link
Author

Hi Tolis,

Here is a interesting message from DevExpress :
https://www.devexpress.com/Support/Center/Question/Details/T749499/office-module-asp-error-on-loading-with-chrome

Exception occurs while assigning the'XpandListView, ID:ExcelImport_ListView' view to WebWindow:
Impossible to start an asynchronous operation at the moment. Asynchronous operations can only be started from a manager or asynchronous module, or during certain events in the page life cycle. If this exception has been removed during the execution of a page, check that it is marked as follows: <%@ Page Async="true" %>. This exception may also indicate an attempt to call an "async void" method, which is not usually supported within ASP.NET request processing. Instead, the asynchronous method must return a task, and the caller must wait for it.

from what i see u did not follow this message. the default.aspx declaration should be

<%@ Page Language="C#" AutoEventWireup="true" Inherits="Default" EnableViewState="false"
ValidateRequest="false" CodeBehind="Default.aspx.cs" Async="true" %>

this is a async module.

I open this ticket because I have issue loading the RichEdit in the ASP (new Office module of XAF)

Any suggestion to manage this ?

BR
ISA

@isatahiri
Copy link
Author

Sorry this ticket is private (customer requirement) so i show you the message from DevExpress :
image

As my issue seems to be out of the Async topic, this is not really urgent but I think we have to take in the consideration the highlighted part.

@apobekiaris
Copy link
Member

this requirement is hard coded and no way to avoid it at the moment. Though as I later discover it can be relaxed as it is missleading. The actual problem is somewhere else and async flag most probably not need.

so Anatol there says pretty much the same.

Nevertheless, it appears that the issue occurs earlier and is unlikely related to asynchronous requests. Your callstack starts with the WebApplication.DisposeInstance method. By default, this method is called only in the Global.Session_End event handler. So, it appears that the user's session is unexpectedly shutdown when the user clicks

@apobekiaris
Copy link
Member

so why don't u provide the logs the guys asked u to and see what their response first

@isatahiri
Copy link
Author

I will go deeper into it by august as this project does not need excelimporter at the moment. pretty busy before my holidays next week :-)

I'll keep u posted when i have news.

@apobekiaris
Copy link
Member

yeah keep me posted please, although XAF does not official support asych due to obvious reasons we have no alt here, and I am pretty sure that XAF team will be most helpful to resolve the problem.

@apobekiaris apobekiaris removed their assignment Jul 3, 2019
@apobekiaris
Copy link
Member

see #661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug ExcelImporter Reactive.XAF eXpandFrameowrk/DevExpress.XAF project
Projects
None yet
Development

No branches or pull requests

3 participants