- ABP Framework version: v4.3.3
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
There is no exception message, but the auth-server logs contain the following information that seems to indicate that the user is not authorized to access /api/account/profile-picture
.
[auth-server_f3e6eab0-2]: [14:36:07 INF] Request starting HTTP/1.1 POST https://localhost:44322/api/account/profile-picture application/json 822772
[auth-server_f3e6eab0-2]: [14:36:07 INF] CORS policy execution successful.
[auth-server_f3e6eab0-2]: [14:36:07 DBG] CORS request made for path: /api/account/profile-picture from origin: http://localhost:4200 but was ignored because path was not for an allowed IdentityServer CORS endpoint
[auth-server_f3e6eab0-2]: [14:36:07 INF] No CORS policy found for the specified request.
[auth-server_f3e6eab0-2]: [14:36:07 INF] Authorization failed. These requirements were not met:
[auth-server_f3e6eab0-2]: DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
[auth-server_f3e6eab0-2]: [14:36:07 INF] AuthenticationScheme: Identity.Application was challenged.
[auth-server_f3e6eab0-2]: [14:36:07 INF] Request finished HTTP/1.1 POST https://localhost:44322/api/account/profile-picture application/json 822772 - 302 0 - 8.0785ms
- Steps to reproduce the issue:
- Generate a new microservice solution via abp suite v4.3.3 with the options below
- Run
out\MyProject\etc\docker\up.ps1
- Run
tye run
inout\MyProject
- Open Chrome browser on
http://localhost:4200
- Login as
admin
/1q2w3E*
- Click
admin
>Manage your profile
>Profile picture
>Upload File
>Choose File
> Pick an image file >Save Changes
>Yes
- Observe error below
Note: The Microsoft.EntityFrameworkCore.Tools
package was recently upgraded to 5.0.8
which seemed to cause version conflicts with 5.0.7
during the build. I worked around the issue by downgrading to 5.0.7
and editing any .csproj
files that contained version 5.0.*
and replaced them with 5.0.7
explicitly.
8 Answer(s)
-
0
hi
We will fix this problem.
Note: The Microsoft.EntityFrameworkCore.Tools package was recently upgraded to 5.0.8 which seemed to cause version conflicts with 5.0.7 during the build. I worked around the issue by downgrading to 5.0.7 and editing any .csproj files that contained version 5.0.* and replaced them with 5.0.7 explicitly.
You can try to install the latest NET SDK.
5.0.302 https://dotnet.microsoft.com/download/dotnet/5.0
-
0
Hi maliming,
Unfortunately, installing the latest .NET SDK did not solve the problem; the same error occurs.
I did a little digging and it seems
Volo.Abp.EntityFrameworkCore
>= 4.3.3 still depends onMicrosoft.EntityFrameworkCore
5.0.7, but there are several package references in the Microservice template 4.3.3 that specify a wildcard in the patch version number (ie. 5.0.*) for Microsoft.EntityFrameworkCore that started resolving to 5.0.8 as of 2021-07-13. This seems to be what is breaking the build.It seems the only options right now are (1) to replace all instances of
5.0.*
with5.0.7
to matchVolo.Abp.EntityFrameworkCore
, or (2) wait for a new version ofVolo.Abp.EntityFrameworkCore
that depends onMicrosoft.EntityFrameworkCore
5.0.8.Is that an accurate assessment?
-
0
We confirmed a third option exists: explicitly adding
Microsoft.EntityFrameworkCore.Relational
5.0.8 to theShared.Hosting
project gets rid of the conflict. -
0
Thanks @jogoertzen
I will check this.
-
0
hi
You can try to add below to
AuthServer
project.<ItemGroup> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> </ItemGroup>
-
0
hi jogoertzen
Please send a email to liming.ma@volosoft.com I will share the git difference with you.
-
0
Note: The Microsoft.EntityFrameworkCore.Tools package was recently upgraded to 5.0.8 which seemed to cause version conflicts with 5.0.7 during the build. I worked around the issue by downgrading to 5.0.7 and editing any .csproj files that contained version 5.0.* and replaced them with 5.0.7 explicitly.
This is about local nuget cache missmatch with Microsoft.EntityFrameworkCore. You can also try removing
<PrivateAssets>all</PrivateAssets>
line.Solutions to this problem will be a local solution.
We will discuss about using specific version of
Microsoft.EntityFrameworkCore
. -
0
This question has been automatically marked as stale because it has not had recent activity.