Base solution for your next web application

Activities of "guillaumej"

on a regular asp.net mvc project, I used this successfully : <a class="postlink" href="https://www.nuget.org/packages/RedWillow.MvcToastrFlash/">https://www.nuget.org/packages/RedWillo ... astrFlash/</a>

So, I created a unique Migration file (create default database, remove all migration files, Add-Migration Initial) and it worked in My SQl

Maybe you should do that in the srtartup template - nobody is going to down migrate from your migrations.

Hello,

I'd like to use the Dynamic Web API Layer iwith Basic authentication, so that it can be called from anywhere.

Can Iuse this? (of course, afeter <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/OWIN">http://www.aspnetboilerplate.com/Pages/Documents/OWIN</a> ).

I was wondering if somebody has already done it ?

I'm a bit concerned are how much redundancy there is between some DTOs and their entities . For example, a CustomerEntity could be

public class Customer: Entity
{
[Required]
     public string Name {get;set;}

public int CategoryId {get;set;}

public virtual Category Category {get;set;}
}

and its input DTO

public class Customer: IInputDTO
{
public int Id {get;set} // this could be aproblem

[Required]
     public string Name {get;set;}

public int CategoryId {get;set;}
}

I'm especially concerned about having to maintain twosets of identical annotations.

So, I'm wondering about creating an abstract customer

public abstract Abstractcustomer:Entity
{
[Required]
     public string Name {get;set;}

public int CategoryId {get;set;}
}

And having entities and (relevant) DTOs inherited from it. Is there any problem with this idea ?

Yes, I'm a bit bothered about deriving from Entity for my DTO. I'm wondering if I'm going to create a MyEntity implementing IEntity just so I can play with attributes. Not sure too.

Thanks for your answer !

I already implemented basic auth in a regular webapi project, but I'm not 100% safe in my knowledge. I'll try first the way you demonstrated in your very nice documentation.

Thanks for your answer.

Hello,

I'm using the Dynamic Web Api, and checking it using SwaggerUI.

I have one working service, and two not working : error code 500 : "{ "message": "An error has occurred." }"

My problem is I don't know how to get more information

  • the ABP log is not showing anything anything related EDITED : The exception handler is working, it's just it's not an unhandled exception - of course !

To be clear, I don't want the fix to my error (i'm sure it's something stupid), but I'm very interested in accessing the real error message, rather than "an error has occured".

I fixed my problem, but I'm not sure how I could have got the real error.

Also, I use DontWrapResult on my service.

Hello,

I created a project startup called Toto.

I need a second web project, to use as backoffice. (The goal is having every projects in the same solution)

I copied the created Toto.Web to Toto.WebAdmin, renamed namespaces, and right now I'm working in a solution containing only Toto.WebAdmin, and the Core/Application/EntityFramework projects. I also removed the app.UseOAuthBearerAuthentication(AccountController.OAuthBearerOptions); line in startup.cs

It compiles, but when I runs it, I got an error in global.asa/application start : base.Application_Start(sender, e);

It can't load the file or assembly Toto.WebApi :

Abp.Modules.AbpModule.FindDependedModuleTypes(Type moduleType) dans D:\Halil\GitHub\aspnetboilerplate\src\Abp\Modules\AbpModule.cs:ligne 90 Abp.Modules.AbpModuleManager.FillDependedModules(Type module, ICollection1 allModules) dans D:\Halil\GitHub\aspnetboilerplate\src\Abp\Modules\AbpModuleManager.cs:ligne 148 Abp.Modules.AbpModuleManager.AddMissingDependedModules(ICollection1 allModules) dans D:\Halil\GitHub\aspnetboilerplate\src\Abp\Modules\AbpModuleManager.cs:ligne 138 Abp.Modules.AbpModuleManager.LoadAll() dans D:\Halil\GitHub\aspnetboilerplate\src\Abp\Modules\AbpModuleManager.cs:ligne 55 Abp.Modules.AbpModuleManager.InitializeModules() dans D:\Halil\GitHub\aspnetboilerplate\src\Abp\Modules\AbpModuleManager.cs:ligne 33 Abp.AbpBootstrapper.Initialize() dans D:\Halil\GitHub\aspnetboilerplate\src\Abp\AbpBootstrapper.cs:ligne 61 à Abp.Web.AbpWebApplication.Application_Start(Object sender, EventArgs e) dans D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web\Web\AbpWebApplication.cs:ligne 35

It seems you need to reference the WebApi project in every web project. Is it normal ?

Okay, testing further, my error was so "uncommon" (it was a Castle Core injection error because I forgot a IDomainService) that I think normal ABP error handling was not yet activted

I tested on a more "normal" scenario, and if I got a "Internal server error" as a response, the logs are filled correctly.

Sorry !

Showing 11 to 20 of 30 entries