Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "rbarbosa"

I ran into this a while ago, this is a webAPI issue, check this code as an example for the service

public interface IHtmlResponseAppService : IApplicationService
 {
     HttpResponseMessage GetHTMLResult()
 } 

 public class HtmlResponseAppService : AbpAppServiceBase, IHtmlResponseAppService
 {
    public HttpResponseMessage GetHTMLResult()
    {
        string result = "something";

        var resp = new HttpResponseMessage(HttpStatusCode.OK);
        resp.Content = new StringContent(result, System.Text.Encoding.UTF8, "text/html");
        return resp;
    }
}

works on dynamic webapi and whatnot

Answered my own question...missed adding the explicit DLL

Configuration.Modules.AbpWebApi().DynamicApiControllerBuilder
                .ForAll<IApplicationService>(typeof(NeoDynamicsBarcodeModule).Assembly, "app")
                .Build();

Hi

I've created a separate assembly inheriting from abpmodule

[DependsOn(typeof(PrizmApplicationModule))]
    public class NeoDynamicsBarcodeModule : AbpModule
    {...}
public interface INeoDynamicsBarcodeService : IApplicationService {
    string CreateLabelTest(string barCode, string labelType);
}
    public class NeoDynamicsBarcodeService : PrizmAppServiceBase, INeoDynamicsBarcodeService    {
       public string CreateLabelTest(string barCode, string labelType) {...}
}

.WebApi Project

[DependsOn(typeof(AbpWebApiModule), typeof(PrizmApplicationModule),
        typeof(NeoDynamicsBarcodeModule))]
    public class PrizmWebApiModule : AbpModule
    {...}

Am I missing anything to expose this to the public API? Initialize() method on the module is happening before the webAPI tries to register everything

Do you have any examples of a hello world style controller/view/routes that comes from a module?

Hi

I was wondering if there are set conventions when using views from a plugin, my intention is to create each menu item as a plugin, menu registration works great, but there is no such mechanism to map the routes to the modules, or is it? So far I put the controllers and views in the same folder name structure as the main project, also added the PreStarter class from the documentation : ABP.Web

  • Areas\Mpa [list:22z4hnjc][*:22z4hnjc]Controllers
  • Views[/*:m:22z4hnjc][/list:u:22z4hnjc]

Plugin.Web

  • Areas\Mpa [list:22z4hnjc][*:22z4hnjc]Controllers > Home
  • Views > Index[/*:m:22z4hnjc][/list:u:22z4hnjc]

Do i have to write a Route manager that will inject every plugin route to the Routecollection on load? ideally as /module/something I was hoping to keep it as lean as possible to maintain compatibility with the ABP project. Thanks, Rodrigo

Showing 11 to 15 of 15 entries