4

これがアプリケーション層のaspBoilrpLateの私のモジュールです

 [DependsOn(typeof(TransitCoreModule), typeof(AbpAutoMapperModule))]
    public class TransitApplicationModule : AbpModule
    {
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
    }

ここに私のwebapimoduleがあります

 [DependsOn(typeof(AbpWebApiModule), typeof(TransitApplicationModule))]
    public class TransitWebApiModule : AbpModule
    {
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());


            DynamicApiControllerBuilder
                .ForAll<IApplicationService>(typeof(TransitApplicationModule).Assembly, "app")
                .Build();

            Configuration.Modules.AbpWebApi().HttpConfiguration.Filters.Add(new HostAuthenticationFilter("Bearer"));
        }
    }

ここに私のAppServiceがあります

 public class MeetingAppService : TransitAppServiceBase, IMeetingAppService
    {
        private readonly IMeetingManager _meetingManager;
        private readonly IRepository<Meeting.Meeting, Guid> _meetingRepository;
        public MeetingAppService (IMeetingManager meetingManager, IRepository<Meeting.Meeting, Guid> meetingRepository)
        {
            _meetingManager = meetingManager;
            _meetingRepository = meetingRepository;
        }
        public Task Cancel (EntityRequestInput<Guid> input)
        {
            throw new NotImplementedException();
        }

        public async Task Create (CreateMeetingInput input)
        {
            var meeting= Meeting.Meeting.Create(AbpSession.GetTenantId(), input.Subject, input.Title, input.Date, input.StartTime, input.EndTime, input.Secretary, input.Description, input.Agenda);
            await _meetingManager.CreateAsync(meeting);
        }

        public async Task<MeetingDetailOutput> GetDetail (EntityRequestInput<Guid> input)
        {
            var meeting = await _meetingRepository
                .GetAll()
                .Where(m => m.Id == input.Id)
                .FirstOrDefaultAsync();

            return meeting.MapTo<MeetingDetailOutput>();

        }

        public async Task<ListResultOutput<MeetingListDto>> GetList (GetMeetingListInput input)
        {
            var meetings = await _meetingRepository.GetAll()
                .WhereIf(!input.IncludeCanceledMeetings,m=>!m.IsCancelled)
                .ToListAsync();


            return new ListResultOutput<MeetingListDto>(meetings.MapTo<List<MeetingListDto>>());

        }
    }

http://localhost:6634/api/services/app/meeting/Createにアクセスしようとすると 、エラー 500 メッセージが表示されます = エラーが発生しました。私はそれをデバッグする方法を見つけることができません。どうすればこれをデバッグできますか?

4

2 に答える 2

-1

リクエストが有効なソースからのものであることを理解できない場合があります。

サービスで以下のコードを試してください:

[AbpAuthorize]

public class MeetingAppService : TransitAppServiceBase, IMeetingAppService
于 2017-04-12T07:19:43.197 に答える