Base solution for your next web application

Activities of "patrickglaudemans"

Hi,

Is there something like this for the ABP log file format. <a class="postlink" href="https://github.com/sebagomez/log4net-for-notepadpp">https://github.com/sebagomez/log4net-for-notepadpp</a>

Colorfiles will be formatted with nice colors for all kind of log data.

Worked with it in other projects.

Thanks,

Patrick

Hi,

Zero/abp logs entity validation errors – great! ERROR 2015-12-22 11:36:58,854 [7 ] BI.EntityFramework.BIDbContext - There are some validation errors while saving changes in EntityFramework: ERROR 2015-12-22 11:36:58,854 [7 ] BI.EntityFramework.BIDbContext - - Site: The Site field is required. ERROR 2015-12-22 11:36:59,071 [7 ] lers.Filters.AbpExceptionFilterAttribute - System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. at System.Data.Entity.Internal.InternalContext.SaveChangesAsync(CancellationToken cancellationToken) at System.Data.Entity.Internal.LazyInternalContext.SaveChangesAsync(CancellationToken cancellationToken) at System.Data.Entity.DbContext.SaveChangesAsync(CancellationToken cancellationToken) at Abp.EntityFramework.AbpDbContext.<>n__FabricatedMethod2(CancellationToken ) at Abp.EntityFramework.AbpDbContext.<SaveChangesAsync>d__0.MoveNext()

What is, a@client side, the detail object – see below. (validationErrors are clientside val errors)

abp.js:174 ERROR: abp.js:174 Object {code: 0, message: "An internal error occurred during your request!", details: null, validationErrors: null}

Regards, P

Hi,

I'm developing a .net windows service. I want to connect this service to my zero application layer. The application layer still follows the initial setup. Api controllers are therefore dynamically created.

  1. I want to connect to the application layer with REST. What is the best way to set that up with ExternalBearer token etc.
  2. I want to connect an angular file upload call to my application service. Therefore, I have to enhance the Web Api wrapper controller. Should I then manually create the web api controller? How should i do that? I want to create something like this: public class FilesController : ApiController { [HttpPost] // This is from System.Web.Http, and not from System.Web.Mvc public async Task<HttpResponseMessage> Upload() { if (!Request.Content.IsMimeMultipartContent()) { this.Request.CreateResponse(HttpStatusCode.UnsupportedMediaType); } (...) etc.

Thanks for all your help in advance - hope others can gain something from it as well!

Regards, p

Hi,

(by mistake I also posted this question in non premium zero. If preferred, you can delete it there - sorry)

I'm developing a .net windows service. I want to connect this service to my zero application layer. The application layer still follows the initial setup. Api controllers are therefore dynamically created.

  1. I want to connect to the application layer with REST. What is the best way to set that up with ExternalBearer token etc.
  2. I want to connect an angular file upload call to my application service. Therefore, I have to enhance the Web Api wrapper controller. Should I then manually create the web api controller? How should i do that? I want to create something like this: public class FilesController : ApiController { [HttpPost] // This is from System.Web.Http, and not from System.Web.Mvc public async Task<HttpResponseMessage> Upload() { if (!Request.Content.IsMimeMultipartContent()) { this.Request.CreateResponse(HttpStatusCode.UnsupportedMediaType); } (...) etc.

Thanks for all your help in advance - hope others can gain something from it as well!

Hi,

I'm getting sourcemap errors in my google chrome console like so: Failed to parse SourceMap: <a class="postlink" href="http://localhost:6234/App/app.css.map">http://localhost:6234/App/app.css.map</a> Failed to parse SourceMap: <a class="postlink" href="http://localhost:6234/App/common/views/datasources/createOrEditModal.css.map">http://localhost:6234/App/common/views/ ... al.css.map</a> Failed to parse SourceMap: <a class="postlink" href="http://localhost:6234/Common/Styles/core.css.map">http://localhost:6234/Common/Styles/core.css.map</a> Failed to parse SourceMap: <a class="postlink" href="http://localhost:6234/App/common/directives/gridlists/datasource/datasource-List.css.map">http://localhost:6234/App/common/direct ... st.css.map</a> Failed to parse SourceMap: <a class="postlink" href="http://localhost:6234/App/common/views/layout/layout.css.map">http://localhost:6234/App/common/views/ ... ut.css.map</a> Failed to parse SourceMap: <a class="postlink" href="http://localhost:6234/App/common/views/profile/changePicture.css.map">http://localhost:6234/App/common/views/ ... re.css.map</a>

the seems to come out of the blue. Did some googling but got no luck.

Anyone seeing the light?

Thanks,

p

Hi There!

As mentioned in the header I have a custom entity which is some sort of group to which I want to be able to add abpusers. In public class User : AbpUser<Tenant, User> (part of zero in core lib) I added: public List<ContentGroup> ContentGroups { get; set; } and in the custom entity: public List<User> Users { get; set; }

Entity framework created link tables and so far so good. But - no records are inserted after a contentGroup.Users.Add(existingUser) check this piece of code: var user = await UserManager.GetUserByIdAsync(System.Convert.ToInt64(selection)); contentGroup.Users.Add(user); if (contentGroup != null) { await _contentGroupRepository.UpdateAsync(contentGroup);
}

etc.

In the same entity I have another property Reports that is setup exact the same way: it has Reports and Report has ContentGroups (many to many). It works with the report entity..

I think it has something to do with the entity user which is not attached to the build in repository. Can you help me out?

Thanks, P

Hi There!

As mentioned in the header I have a custom entity which is some sort of group to which I want to be able to add abpusers. In public class User : AbpUser<Tenant, User> (part of zero in core lib) I added: public List<ContentGroup> ContentGroups { get; set; } and in the custom entity: public List<User> Users { get; set; }

Entity framework created link tables and so far so good. But - no records are inserted after a contentGroup.Users.Add(existingUser) check this piece of code: var user = await UserManager.GetUserByIdAsync(System.Convert.ToInt64(selection)); contentGroup.Users.Add(user); if (contentGroup != null) { await _contentGroupRepository.UpdateAsync(contentGroup);
}

etc.

In the same entity I have another property Reports that is setup exact the same way: it has Reports and Report has ContentGroups (many to many). It works with the report entity..

I think it has something to do with the entity user which is not attached to the build in repository. Can you help me out?

Thanks, P

Hi,

I want to access my ZERO application services from within an external class library (console/win service etc.) Therefore I need to initialize the IocManager like IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly()); This is only working in a AbpModule. What's the proper way to setup this up.

Hi,

Used the Console App (Acm.PhoneBook) as example to setup access from console classlib to zero implementation (application layer etc.)

Created all the proper instances and bootstrapper. Initializing is running well but after calling: var eventProcessor = bootstrapper.IocManager.Resolve<ReportAppService>(); I get this error:

Can't create component 'Intertek.BI.Reporting.Reports.ReportAppService' as it has dependencies to be satisfied.

'Intertek.BI.Reporting.Reports.ReportAppService' is waiting for the following dependencies:

  • Service 'Abp.Domain.Repositories.IRepository`1[[Intertek.BI.Entities.Report, Intertek.BI.Core, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.
  • Service 'Abp.Domain.Repositories.IRepository`1[[Intertek.BI.Entities.SiteOffice, Intertek.BI.Core, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.
  • Service 'Intertek.BI.Reporting.Core.ReportManager' which was not registered.
  • Service 'Intertek.BI.Storage.DbBinaryObjectManager' which was registered but is also waiting for dependencies. 'Intertek.BI.Storage.DbBinaryObjectManager' is waiting for the following dependencies:
  • Service 'Abp.Domain.Repositories.IRepository`2[[Intertek.BI.Storage.BinaryObject, Intertek.BI.Core, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null],[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' which was not registered.
  • Service 'Abp.Domain.Repositories.IRepository`1[[Intertek.BI.Entities.DataSource, Intertek.BI.Core, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.
  • Service 'Abp.Domain.Repositories.IRepository`1[[Intertek.BI.Entities.ReportTableCommand, Intertek.BI.Core, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.

It' seems that DI is not working since registration was not done properly.

Hi,

I have an entity called Job. It has property (child object) Report (many to one). Each Job has only one report.

While saving the job through a standard ZERO setup (application service with all the standard setup), it's not possible to only save the Id of the report entity while saving only a job. At current, at the moment of update, Job has a populated property Report indeed. When updating it is going through the automated validation of DBContext etc. etc. When there are child properties within the report object (which aren't loaded ofcourse) then the save of the Job entity will fail because of the Report entity! But I don't want to save Report! I want to save Job with only the Report ID (the reference)..

How can I force to only store Job with report Id/reference and not going to store Report entity as well?!

This is partly a EF question but since the DBContext is hidden in the standard JobRepository it's caused by zero setup.

<code> public async Task CreateOrUpdateJob(CreateOrUpdateJobInput input) {

        if (input.Job.Id > 0)
        {
            //existing Job
            var Job = await _JobRepository.GetAsync(input.Job.Id);
            input.Job.MapTo(Job);
            await _JobRepository.UpdateAsync(Job);
        }
        else
        {
            //new Job
            await CreateJobAsync(input);
        }
    }

</code>

Showing 1 to 10 of 18 entries