c#--ABP Demo 报错记录

本文汇总了编程过程中常见的错误,包括DLL文件缺失、类名与项目名冲突、HTTP方法重复定义、ABP-AutoMapper映射异常、Angular静态注入错误及MongoDB连接问题,并提供了详细的解决策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • 未能找到源数据文件 xxx.dll。删除引用-分析器里的数据重新编译

  • xxxxxx是“命名空间”,但此处被当做“类型”来使用”的解决方案。解决:避免类名和项目名重复

  • System.NotSupportExpection:HTTP method get & path"..."overloaded by action

提示信息:Actions require unique method/path combination for Swagger 2.0. Use          ConflictingActionsResolver as a workaround---- Change the name of the error 

causing GET action method to something else and try?

原因:以下两个方法重复。修改方法名

      public async Task<TaskDto> GetTasksDataByIdAsync(int taskId)

      public TaskDto  GetTasksDataById(int taskId)

  • ABP-AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.

 解决: mapperConfig.CreateMap<CreateTaskInput,MyAbpProject.Demo.TasksEntity>().ReverseMap();

 List< TasksEntity>转换为List<TaskDto>:

GetTasksOutput result = new GetTasksOutput();

result.Tasks=ObjectMapper.Map<List<TaskDto>>(query.ToList());

  •  angular报错StaticInjectorError(RootModule)[EditbevComponent -> MlcComponent]:

StaticInjectorError(Platform: core)[EditbevComponent -> MlcComponent]:

NullInjectorError: No provider for MlcComponent!

解决:module中将component的路径设置为全局路径。并将要调用的component作为@ViewChild('mlcShape') <app-mlc        #mlcShape >

  • MongoDB连接localhost换成IP地址后连接不上。

解决:配置文件中的bindIp:换成0.0.0.0   表示可以接受任何IP的连接 防火墙的27017端口开放。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值