- **ABP Framework version: 4.0.0-rc.3
- UI type: MVC
- Tiered (MVC) or Identity Server Seperated (Angular): no
- Exception message and stack trace:
I am having all sorts of trouble with this error. Sometimes it works once, sometimes not at all
This is coming from an ABP Suite generated ApplicationService
public class CountryAppService : ApplicationService, ICountryAppService
This is being utilized by a Blazor component hosted in a razor file
<app>
<component type="typeof(CountryManager)" render-mode="ServerPrerendered" />
</app>
I had no problems whatsoever with v3.
Let me know if you require additional information. Thank you
7 Answer(s)
-
0
I have a project for you to review this. Please provide an email address .
-
0
. .sending linkk with code to shiwei.liang@volosoft.com
-
0
Switching
public class CountryAppService : ApplicationService, ICountryAppService
to
public class CountryAppService : CrudAppService<Country,CountryDto, string, GetCountriesInput, CountryCreateDto, CountryUpdateDto>, ICountryAppService
resolved the issue
-
0
hi, let me reproduce this issue.
is your primary key "string"?
also can you share your Country.json?
-
0
I'm not using your default ui generation. I'm using a razor page (Index.cshtml) with a razor component inside that
<app> <component type="typeof(CountryManager)" render-mode="ServerPrerendered" /> </app>
it was running fine if I inherited from CrudAppService but now I'm getting disposal is that way as well. this may have happened because I just upgraded to RC4 (which I hoped might fix the issue)
Would you like a project to test?
-
0
send a copy of your project so that we'll see the issue. please clear all bin & obj folders before zipping. send to info@abp.io
-
0
I don't know if this is an issue with your framework or with blazor components themselves. In the end I seem to have stable results with the following:
Iinheriting from OwningComponentBase. Note not the generic OwningComponentBase due to the Service being disposed.
using the following code, refreshing the services if they got disposed of.
protected IObjectMapper ObjectMapper => _objectMapper ??= ScopedServices.GetRequiredService<IObjectMapper>(); protected TService Service => _service ??= ScopedServices.GetRequiredService<TService>();