Base solution for your next web application

Activities of "vnetonline"

now i am getting

C:\Users\vbelani\Amazing\AmazingSoftware\angular>ng build --prod Your global Angular CLI version (7.3.9) is greater than your local version (7.3.7). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false". 92% chunk asset optimization TerserPlugin <--- Last few GCs --->

[8664:000001E5342779F0] 213055 ms: Scavenge 1320.3 (1437.9) -> 1310.8 (1439.4) MB, 44.2 / 0.0 ms (average mu = 0.272, current mu = 0.294) allocation failure [8664:000001E5342779F0] 213205 ms: Scavenge 1324.1 (1439.4) -> 1314.6 (1442.4) MB, 20.1 / 0.0 ms (average mu = 0.272, current mu = 0.294) allocation failure

<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 000002A315F5C5C1]

Security context: 0x031a8499e6e9 <JSObject> 1: _walk [00000389F951FA81] [C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\terser\dist\bundle.min.js:~1] [pc=000002A31903C529](this=0x022660b76dd1 <AST_SymbolRef map = 000003FCCF043181>,e=0x02ef5854c9c9 <gn map = 000003F62F605221>) 2: /* anonymous */ [000002C0C3566429] [C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\t...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF6F443F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114 2: 00007FF6F441A0C6 node::MakeCallback+4518 3: 00007FF6F441AA30 node_module_register+2032 4: 00007FF6F46A20EE v8::internal::FatalProcessOutOfMemory+846 5: 00007FF6F46A201F v8::internal::FatalProcessOutOfMemory+639 6: 00007FF6F4BC2BC4 v8::internal::Heap::MaxHeapGrowingFactor+9556 7: 00007FF6F4BB9C46 v8::internal::ScavengeJob::operator=+24310 8: 00007FF6F4BB829C v8::internal::ScavengeJob::operator=+17740 9: 00007FF6F4BC0F87 v8::internal::Heap::MaxHeapGrowingFactor+2327 10: 00007FF6F4BC1006 v8::internal::Heap::MaxHeapGrowingFactor+2454 11: 00007FF6F477CDB7 v8::internal::Factory::NewFillerObject+55 12: 00007FF6F4812CC6 v8::internal::WasmJs::Install+29414 13: 000002A315F5C5C1

C:\Users\vbelani\Amazing\AmazingSoftware\angular>

i have already added ng-high-memory in package.json

"scripts": { "ng-high-memory": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng", "ng": "ng", "publish": "ng build --prod", "start": "ng serve --host 0.0.0.0 --port 4200", "hmr": "ng serve --host 0.0.0.0 --port 4200 --hmr", "test": "ng test", "pree2e": "webdriver-manager update --standalone false --gecko false", "e2e": "protractor" },

just deleted the node_modules folder and ran yarn again got the following warinings

C:\Users\vbelani\Amazing\AmazingSoftware\angular>yarn yarn install v1.15.2 [1/4] Resolving packages... [2/4] Fetching packages... info [email protected]: The platform "win32" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @angular/[email protected]" has incorrect peer dependency "zone.js@~0.8.26". warning " > @swimlane/[email protected]" has unmet peer dependency "d3@^4.10.2". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-array@^1.2.1". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-brush@^1.0.4". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-color@^1.0.3". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-force@^1.1.0". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-format@^1.2.0". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-hierarchy@^1.1.5". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-interpolate@^1.1.5". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-scale@^1.0.6". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-selection@^1.1.0". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-shape@^1.2.0". warning " > @swimlane/[email protected]" has unmet peer dependency "d3-time-format@^2.1.0". warning " > @swimlane/[email protected]" has incorrect peer dependency "zone.js@^0.8.26". warning " > [email protected]" has incorrect peer dependency "@angular/[email protected]". warning " > [email protected]" has incorrect peer dependency "@angular/[email protected]".

could this be the issue how do i resolve these warnings

Getting the following error when i run ng build --prod

chunk {1087} 1087.d0660c70a921ec2d081d.js () 2.41 kB [rendered] chunk {1088} 1088.81d657baee0203f2e23c.js () 1.24 kB [rendered] chunk {1089} 1089.e22e0e6466296922a63b.js () 3.15 kB [rendered] chunk {1090} 1090.35cf5f1ff3979025db82.js () 1.54 kB [rendered] chunk {1091} 1091.6234fa9298e4fcca6db6.js () 2.19 kB [rendered] chunk {scripts} scripts.64884b7aff66d8483343.js (scripts) 1.64 MB [entry] [rendered]

WARNING in ./node_modules/@swimlane/ngx-charts/release/common/base-chart.component.js 20:38-56 "export 'VisibilityObserver' was not found in '../utils'

ERROR in ./node_modules/object-path/index.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): Error: ENOENT: no such file or directory, open 'C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\object-path\index.js' at Object.openSync (fs.js:438:3) at Object.readFileSync (fs.js:343:35) at Storage.provideSync (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13) at CachedInputFileSystem.readFileSync (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:259:32) at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\webpack-input-host.js:35:51) at Observable._trySubscribe (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\node_modules\rxjs\internal\Observable.js:44:25) at Observable.subscribe (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\node_modules\rxjs\internal\Observable.js:30:22) at SyncDelegateHost._doSyncCall (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@angular-devkit\core\src\virtual-fs\host\sync.js:22:20) at SyncDelegateHost.read (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@angular-devkit\core\src\virtual-fs\host\sync.js:49:21) at WebpackCompilerHost.readFileBuffer (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\compiler_host.js:125:44) at VirtualFileSystemDecorator.readFile (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\virtual_file_system_decorator.js:39:54) at processResource (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:202:11) at iteratePitchingLoaders (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:158:10) at iteratePitchingLoaders (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:165:10) at C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:176:18 at loadLoader (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\loadLoader.js:47:3) ERROR in ./node_modules/rtl-detect/index.js Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js): Error: ENOENT: no such file or directory, open 'C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\rtl-detect\index.js' at Object.openSync (fs.js:438:3) at Object.readFileSync (fs.js:343:35) at Storage.provideSync (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13) at CachedInputFileSystem.readFileSync (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:259:32) at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\webpack-input-host.js:35:51) at Observable._trySubscribe (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\node_modules\rxjs\internal\Observable.js:44:25) at Observable.subscribe (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\node_modules\rxjs\internal\Observable.js:30:22) at SyncDelegateHost._doSyncCall (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@angular-devkit\core\src\virtual-fs\host\sync.js:22:20) at SyncDelegateHost.read (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@angular-devkit\core\src\virtual-fs\host\sync.js:49:21) at WebpackCompilerHost.readFileBuffer (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\compiler_host.js:125:44) at VirtualFileSystemDecorator.readFile (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules@ngtools\webpack\src\virtual_file_system_decorator.js:39:54) at processResource (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:202:11) at iteratePitchingLoaders (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:158:10) at iteratePitchingLoaders (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:165:10) at C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\LoaderRunner.js:176:18 at loadLoader (C:\Users\vbelani\Amazing\AmazingSoftware\angular\node_modules\loader-runner\lib\loadLoader.js:47:3)

How do you execute these batch files when you hit the play button and how do you go about debugging the project ?

i am wonderjngbis there is a way to strat the HOST, PIBLIC SITE and the corr project all by pressing the play button in VS 2017?

i dont want to each and every time open cmd prompt and run the "Start npm" command?

Hi, I would like to cache-control the different contenttype like image/jpeg. currently, i have written application server method which is always conveted into dynamic web api with contenttype application/JSON.

I would like to achieve the cache-control mechanism for some of the images i am returnig to client using below application service method. but when i try calling web api method from swagger dynamic web api interface, it is always content type of application/json with no-cache control.

my application service method is as below

public  HttpResponseMessage GetContractSignatures()
        {
            HttpResponseMessage response = new HttpResponseMessage(System.Net.HttpStatusCode.OK);

            
            try
            {
                byte[] buffer =  _attachmentImagesRepository.Get(1).Image;
                //var image = Image.FromStream(new MemoryStream(buffer));

           
                Image image = Image.FromStream(new MemoryStream(buffer));
                MemoryStream memoryStream = new MemoryStream();
                image.Save(memoryStream, ImageFormat.Jpeg);

                response.Content = new ByteArrayContent(memoryStream.ToArray());
                response.Content.Headers.ContentType = new MediaTypeHeaderValue("image/jpeg");

                response.Headers.CacheControl = new CacheControlHeaderValue() { Public = true, MaxAge = new TimeSpan(1, 0, 0, 0) };
               
               
                return response;
            }
            catch (HttpException)
            {
                response.Content = new StringContent("HttpException", Encoding.UTF8, "image/jpeg");
                return response;
            }

        }

It appears that this happens when the foreign key is a string and is required. For eg

[Required] public virtual string BranchId { get; set; }

If the foreign keys are longs, ints etc, they can be non nullable. But in case of strings, this causes a problem. It would be nice if someone could investigate whether this is a boilerplate issue or an entity framework one.

For the time being I simply do this to make it all work.. (let me know if this is wrong approach). It tends to update the LastModificationTime, DeletionTime and DeleterUserId correctly.

    public async Task Delete(EntityDto&lt;string&gt; input)
    {
        var lead = await _leadRepository.GetAsync(input.Id);
        if(lead != null)
        {
            lead.IsDeleted = true;
        }
    }

Yes tried that already but same error. It's happening for another table as well. Is there some way to debug this? Could it be that some packages are out of date and if so how should these packages be updated using nuget? Thanks.

Thanks for your response. I actually fixed this by doing the following.

await _personAppService.CreateOrUpdateApplicant( input.OpportunityId,input.Applicant = null);

However there are some other errors I am getting. One of these is that two DTO objects cannot be passed into the same Service method. This I resolved by using another object that is a composite of these objects.

However, the other one is very weird. We have a Leads table and delete async is not working. It says Brand Id and Branch Id are required. These are required fields in the Leads table but there should not be any problems with Delete. Following is the function call.

    public async Task DeleteLead(EntityDto&lt;string&gt; input)
    {
        await _leadRepository.DeleteAsync(input.Id);
    }

This link had similar problems but no solution posted there.

#2334

These is the error message in detail

ERROR 2017-06-01 15:11:26,459 [6 ] nect.EntityFramework.AppConnectDbContext - There are some validation errors while saving changes in EntityFramework: ERROR 2017-06-01 15:11:26,459 [6 ] nect.EntityFramework.AppConnectDbContext - - BranchId: The BranchId field is required. ERROR 2017-06-01 15:11:26,460 [6 ] nect.EntityFramework.AppConnectDbContext - - BrandId: The BrandId field is required. ERROR 2017-06-01 15:11:26,501 [6 ] nHandling.AbpApiExceptionFilterAttribute - Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.

I am getting a very strange error. My solution was working correctly.

This is the method signature of my personAppService.

public PersonAppService : AppConnectAppServiceBase, IPersonAppService { public async Task CreateOrUpdateApplicant(OppPersonInput input, string opportunityId); }

I call this method from within another service like so,

await _personAppService.CreateOrUpdateApplicant(input.Applicant, input.OpportunityId);

My input objects looks like this public class input { public string OpportunityId { get; set; } public OppPersonInput Applicant { get; set; } }

[AutoMap(typeof(Person))] public class OppPersonInput { [MaxLength(40)] public string LastName { get; set; } [MaxLength(40)] public string FirstName { get; set; } }

Person is an entity framework entity.

When input.Applicant is passed as null from the DTO, the CreateOrUpdateApplicant throws a validation exception ( the control does not even pass into the function). I have also tried passing null directly into this function but that doesnt work either. OppPersonInput has not been set to [Required] and none of its properties are Required.

I have made sure that I am passing {Applicant : null} in the input object DTO through swagger. But even if I pass a null value to the function directly as in _personAppService.CreateOrUpdateApplicant(null, input.OpportunityId) I get the validation messages below (in C# obviously you can pass null to a function).

'Abp.Runtime.Validation.Abp ValidationException' in Abp.dll ("Method arguments are not valid! See Validation Errors for details.")

See ValidationErrors for details. at Abp.Runtime.Validation.Interception.MethodInvocationValidator.Validate() in D:\Halil\Github\aspnetboilerplate\src\Abp\Runtime\Validation\Interception\MethodInvocationValidator.cs:line 94 at Abp.Runtime.Validation.Interception.ValidationInterceptor.Intercept(IInvocation invocation) in D:\Halil\Github\aspnetboilerplate\src\Abp\Runtime\Validation\Interception\ValidationInterceptor.cs:line 31 at Castle.DynamicProxy.AbstractInvocation.Proceed()

Showing 11 to 20 of 57 entries