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

Bug in Sample DashboardDemo #2716

Closed
Gosha24 opened this issue Jan 26, 2020 · 6 comments
Closed

Bug in Sample DashboardDemo #2716

Gosha24 opened this issue Jan 26, 2020 · 6 comments
Assignees
Milestone

Comments

@Gosha24
Copy link

Gosha24 commented Jan 26, 2020

I'm playing with sample DashboardDemo. When i run it in Debug mode i get exception in line
app.UseVirtualFiles(); in DashboardDemoWebModule. I commented out lines
Configure(options =>
{
//options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar)));
//options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Domain.Shared", Path.DirectorySeparatorChar)));
//options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Domain", Path.DirectorySeparatorChar)));
//options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Application.Contracts", Path.DirectorySeparatorChar)));
//options.FileSets.ReplaceEmbeddedByPhysical(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}DashboardDemo.Application", Path.DirectorySeparatorChar)));
//options.FileSets.ReplaceEmbeddedByPhysical(hostingEnvironment.ContentRootPath);
});
as was recomended in issue 274188A .Then i get next exception in line
var myGroup = context.AddGroup(DashboardDemoPermissions.GroupName);
in file DashboardDemoPermissionDefinitionProvider
I commented out this line then everything works.
It looks like this code was not renewed from previous versions.

@hikalkan hikalkan added this to the 2.0.2 milestone Jan 26, 2020
@hikalkan hikalkan added the bug label Jan 26, 2020
@yekalkan yekalkan removed the bug label Jan 27, 2020
@yekalkan
Copy link
Member

I encountered none of these problems. I can check again if you provide more detailed reproduction steps.

@hikalkan hikalkan removed this from the 2.0.2 milestone Jan 27, 2020
@Gosha24
Copy link
Author

Gosha24 commented Jan 27, 2020

1 Copy sample from source repository
2) I changed all references on framework and module projects in .csproj files to references on NugetPackages with latest version 2/0/1 .
3) All standard steps with migration of DB
4) Run DasboardDemo.Web
5) First exception in app.UseVirtualFiles();
6) Commented Configure(options => as shown before
7) Next run
8) exception in var myGroup = context.AddGroup(DashboardDemoPermissions.GroupName);
Volo.Abp.AbpException
HResult=0x80131500
Message=There is already an existing permission group with name: DashboardDemo
Source=Volo.Abp.Authorization
StackTrace:
at Volo.Abp.Authorization.Permissions.PermissionDefinitionContext.AddGroup(String name, ILocalizableString displayName, MultiTenancySides multiTenancySide)
at DashboardDemo.Permissions.DashboardDemoPermissionDefinitionProvider.Define(IPermissionDefinitionContext context) in E:\temp\Azure\WpfDev\DashboardDemo\src\DashboardDemo.Application\Permissions\DashboardDemoPermissionDefinitionProvider.cs:line 11
at Volo.Abp.Authorization.Permissions.PermissionDefinitionManager.CreatePermissionGroupDefinitions()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)

@hikalkan hikalkan reopened this Feb 1, 2020
@hikalkan hikalkan added this to the 2.1 milestone Feb 1, 2020
@hikalkan
Copy link
Member

hikalkan commented Feb 1, 2020

@yekalkan can you check it again?

@yekalkan
Copy link
Member

yekalkan commented Feb 3, 2020

  1. First exception in app.UseVirtualFiles();

Pretty normal. You changed ProjectReferences to PackageReferenceses and therefore you can't use ReplaceEmbeddedByPhysical method anymore.

Message=There is already an existing permission group with name: DashboardDemo

That is strange. You can delete DashboardDemoPermissionDefinitionProvider.cs file and try again.

@Gosha24
Copy link
Author

Gosha24 commented Feb 3, 2020

I deleted DashboardDemoPermissionDefinitionProvider.cs . Everything Ok

@yekalkan yekalkan closed this as completed Feb 3, 2020
@JohnnyZhang0628
Copy link

JohnnyZhang0628 commented Sep 23, 2020

I also encountered this problem
image
I Commented configure code, and deleted DashboardDemoPermissionDefinitionProvider.cs .It still not work.What should i do?

// options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiThemeSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}abp{0}framework{0}src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar)));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants