- ABP Framework version: v8.3.2
- UI Type: Blazor WebApp
- Database System: EF Core - SQL Server
- Tiered (for MVC) or Auth Server Separated (for Angular): no
- Exception message and full stack trace:
- Steps to reproduce the issue:
Previously I had an application in blazor webassembly since it was born in net core 6. After migrating to Blazor WebApp I am having problems since one of my components injects the IAccessTokenProvider interface (belongs to Microsoft.AspNetCore.Components.WebAssembly.Authentication.dll).
After the migration this service is no longer injected, moreover, I have tried to inject IAbpAccessTokenProvider, but the implementation I get is Volo.Abp.AspNetCore.Components.WebAssembly.WebApp.CookieBasedWebAssemblyAbpAccessTokenProvider, which after reviewing its code, returns a null string.
By default I use InteractiveAutoRenderMode with prerender set to false. I've tried to indicate in the component that it uses the InteractiveWebAssemblyRenderMode interface but it doesn't solve anything. Any idea?
18 Answer(s)
-
0
hi
The web app has two modes,
serverandwasm.CookieBasedmeans you don't need to get the access token because of the authentication state in the cookies.You can request the API, The browser will add the cookies automatically.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
After trying to remove its use, the request continues to fail.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0
As far as I know we don't manage that, localhost is my computer and 44362 is the port where the application is exposed when debugging, which is configured in the appsettings.
What are the risks of this being different, and do they need to be the same? If so, how can I change it?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi, I can't share a sample project as it is a final application.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
After creating a new project, the only thing I added was an AppService without complexity, with a method without parameters or functional implementation, to test a call to the api, and the result I get is the same as in the final application, attached images:

Additionally, it also does not inject microsoft's IAccessTokenProvider.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Can you reproduce the Problem in the new template?
If so, Please share the template with liming.ma@volosoft.com
I will download and test it.
Thanks.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Yes, as I have attached in the images, it does reproduce. I will send it to you now. Thank you!
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Sorry, but I'm missing the point of this thread.
- You have asked about whether the cookie and the domain are on the same port.(https://abp.io/qa/questions/8623/3a17711b-c085-7e46-9c30-f1b7dd14075f).
- After answering you that the cookie appears localhost without port you told me that I have two domains and that I can explain it to you.(https://abp.io/qa/questions/8623/3a17713f-4e4b-d3d1-0501-248f5f43d968).
- I asked you what risks this entails and how I could change it, as I have not changed any of it, to which I received the reply of sending you the test project. Where you then asked me for a new abp project.
- I implement a new solution and add two screenshots where you can see that exactly the same thing is happening.
- I send you the project and your answer is that the api requests are correct, where in the gif you can't see the api headers and you can see that the cookie is "localhost".
I need to get the token so I can assign it to a request.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0




