a blog for those who code

Thursday 19 July 2018

How I got Started With AspNetBoilerPlate

So recently I got hooked up with AspNetBoilerPlate to start a new project. Though the documentation was awesome, still you will find a lot of discrepancies if you are looking at the source codes.


At whatever point you need to build up an application, you need to consider outlining the design of the application, the security, and the execution. Imagine a scenario in which I say that all the above things are already done for you, you simply need to add the business logic to get up and running with the cutting edge application. ASP.NET Boilerplate is an application structure which actualizes best practices in this manner encourages the developers to concentrate just on the improvement of the application and don't consider the engineering/architecture.

Some of the errors which I faced, and how I resolved them

1. When Running a Test, you might encounter the error "Message: System.InvalidOperationException : Mapper not initialized. Call Initialize with appropriate configuration. If you are trying to use mapper instances through a container or otherwise, make sure you do not have any calls to the static Mapper.Map methods, and if you're using ProjectTo or UseAsDataSource extension methods, make sure you pass in the appropriate IConfigurationProvider instance."

To solve this error you have to change Configuration.Modules.AbpAutoMapper().UseStaticMapper from false to true in the file TestModule.cs on the line number 36.

2. I was also getting Error "Message: Abp.AbpException : Can not register IQuestionAppService. It should be a non-abstract class. If not, it should be registered before.", this is because I missed to add : ApplicationService, IQuestionAppService in my application service file.

3. One more Issue which I faced was "Message: Castle.MicroKernel.ComponentNotFoundException : No component for supporting the service", this is when I was using LocalIocManager.Resolve in my Test.cs file. So I chnaged it to use Resolve instead.



Please like and share the CodingDefined.com blog if you find it useful and helpful.

No comments:

Post a Comment