Base solution for your next web application

Activities of "dexmox"

Hi All,

Thanks in advance for your time and efforts.

9.3 MVC Core JQuery

Issue: This works on work dev machine but not home office machine and errors out as below. Was working 2 days ago, the package json is the same on both machines. The css file is exactly the same on both machines. Yarn lock has same version of jquery ui dist. bundles are the same on both machines.

It is creating the sample-report.min.css on my work machine - not on my home machine.

I am at a loss as to why it works on one and not the other and how to fix it.

Any help again, is greatly appreciated.

Have a safe and wonderful day.

Added to bundles:

{
 "scripts": [
    {
      "output": "view-resources/Areas/App/Views/_Bundles/sample-report.min.js",
      "input": [
        "node_modules/jquery-ui-dist/jquery-ui.js",
        "node_modules/knockout/build/output/knockout-latest.js",
        "node_modules/devextreme/dist/js/dx.all.js",
        "node_modules/@devexpress/analytics-core/dist/js/dx-analytics-core.js",
        "node_modules/devexpress-reporting/dist/js/dx-webdocumentviewer.js"
      ]
    },
  ....
"styles": [
    {
      "output": "/view-resources/Areas/App/Views/_Bundles/sample-report.min.css",
      "input": [
        "node_modules/jquery-ui-dist/jquery-ui.css",
        "node_modules/devextreme/dist/css/dx.common.css",
        "node_modules/devextreme/dist/css/dx.light.css",
        "node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css",
        "node_modules/@devexpress/analytics-core/dist/css/dx-analytics.light.css",
        "node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css"
      ]
    },
    ...

added to package.json:

dependencies: [
    "devextreme": "20.2.5",
    "@devexpress/analytics-core": "20.2.5",
    "devexpress-reporting": "20.2.5",
    "jquery-ui-dist": "1.12.1"
]

Error: npm run create bundles:

Bundles are being created, please wait...
[19:51:03] 'buildDev' errored after 5.3 s
[19:51:03] Error in plugin "gulp-less"
Message:
    Could not parse alpha in file C:\*.Web.Mvc\node_modules\jquery-ui-dist\jquery-ui.css line no. 1307
Details:
    type: Syntax
    filename: C:\*.Web.Mvc\node_modules\jquery-ui-dist\jquery-ui.css
    index: 37223
    line: 1307
    column: 23
    callLine: NaN
    callExtract: undefined
    extract:    opacity: .003;, filter: Alpha(Opacity=.3); /* support: IE8 */,}
    lineNumber: 1307
    fileName: C:\*.Web.Mvc\node_modules\jquery-ui-dist\jquery-ui.css
    domainEmitter: [object Object]
    domainThrown: false

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] create-bundles: `yarn && gulp buildDev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] create-bundles script.

Similar / Same Issue : https://stackoverflow.com/questions/54362146/error-in-plugin-gulp-less-could-not-parse-alpha-in-jquery-ui-css

  • Product version? ANZ 9.3
  • Product type: MVC
  • Framework type: CORE

Thanks in advance, and sorry for the lack of DevExpress (Xtra Report) Knowledge.

Guide: https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/DevExpress-Reporting-Implementation

What I would like to do is limit a reports to a single tenant and stop a tenant from specifying another tenant's Id eg. using url App/SampleReport?tenantId=2. When I pass the model in this way (see below) to the view the tenantId is received (and works for a blank report and a labled to show the passed in parameter) but if I use a DevExpress:Table Report which is bound to a datasource the report wont load.

My assumption is because the datasource is being removed when creating a

new SampleReport()

An example scenario might be I want a report for Today's Completed Sales and I use a table to store these sales called "CompletedSales" and I want to show/filter all the completed sales for the current Tenant and Filter by creation time today.

Any insight in how to tackle this would be much appreciated :) Hope you all have a wonderful day!

Controller:

...
    public IActionResult Index()
        {
            var report = new SampleReport();
            report.Parameters["tenantId"].Value = AbpSession.TenantId;
            return View(report);
        }
...

View:

@model XtraReport; 
...
<div class="container-fluid">
    <div class="row">
            <!-- Report -->
            <div class="d-flex flex-column flex-column-fluid">
                <div class="@(await GetContainerClass())">
                    <div class="card card-custom gutter-b">
                        <div class="card-body">
                            @(Html.DevExpress()
                                    .WebDocumentViewer("DocumentViewer")
                                    .Height("820px")
                                    .Bind(Model)
                                )
                        </div>
                    </div>
                </div>
            </div>
    </div>
</div>
...

Thanks again =)

  • What is your product version? ANZ Version 9.3.0

  • What is your product type (Angular or MVC)? MVC + JQuery

  • What is product framework type (.net framework or .net core)? .Net Core

Thank you in advance.

Could you please point me in the direction to resolve this issue - was working a few days ago, then suddenly stopped. I am not great with Yarn / NPM / Gulp.

I havent added any packages that I am aware of. I have added two new themes to the bundles.json which are working normally, and created as per the documentation. Deleted yarn.lock and node_modules - re run yarn

I would also be willing to grant you access via teamviewer if you would like to schedule a connection with me - at your convenience, if I cannot provide any additional information to figure out what may be going wrong.

Debug Log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'create-bundles'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'precreate-bundles', 'create-bundles', 'postcreate-bundles' ]
5 info lifecycle [email protected]~precreate-bundles: [email protected]
6 info lifecycle [email protected]~create-bundles: [email protected]
7 verbose lifecycle [email protected]~create-bundles: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~create-bundles: PATH: C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Admin\source\MyPackageName\src\MyPackageName.Web.Mvc\node_modules\.bin;C:\Users\Admin\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Admin\bin;C:\Program Files (x86)\iis express\PHP\v5.6;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies;C:\Program Files\Microsoft Network Monitor 3;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Acronis\CommandLineTool;C:\Program Files\Acronis\PyShell\bin;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\Program Files (x86)\Common Files\Acronis\VirtualFile;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64;C:\Program Files\PuTTY;C:\Users\Admin\AppData\Local\atom\bin;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\dotnet;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\Yarn\bin;C:\Program Files\nodejs;C:\Users\Admin\.dotnet\tools;C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\bin;C:\DOCFX\docfx.exe;C:\Users\Admin\AppData\Local\Yarn\bin;C:\Users\Admin\AppData\Roaming\npm;C:\Program Files (x86)\EaseUS\Todo Backup\bin\x64;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle [email protected]~create-bundles: CWD: C:\Users\Admin\source\MyPackageName\src\MyPackageName.Web.Mvc
10 silly lifecycle [email protected]~create-bundles: Args: [ '/d /s /c', 'yarn && gulp buildDev' ]
11 silly lifecycle [email protected]~create-bundles: Returned: code: 1  signal: null
12 info lifecycle [email protected]~create-bundles: Failed to exec create-bundles script
13 verbose stack Error: [email protected] create-bundles: `yarn && gulp buildDev`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1026:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\Admin\source\MyPackageName\src\MyPackageName.Web.Mvc
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "create-bundles"
18 verbose node v13.14.0
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] create-bundles: `yarn && gulp buildDev`
22 error Exit status 1
23 error Failed at the [email protected] create-bundles script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Hi All,

Thank you in advance.

Sign in was working yesterday in chrome, and while i was logged in testing application i suddenly got logged out and havent been able to log back in to application (tenant or host) using chrome browser Version 80.0.3987.162 (Official Build) (64-bit)

Sign in is working in IE and Edge but not chrome.

Any ideas on what has happened and how to fix it would be greatly appreciated.

ANZ Version: 8.2.1 Jquery MVC Flavour

IIS Logs when login using IE:

INFO  2020-04-02 10:00:09,028 [10   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://myiispc:44302/Account/Login application/x-www-form-urlencoded; charset=UTF-8 263
INFO  2020-04-02 10:00:09,067 [10   ] tCore.Cors.Infrastructure.CorsMiddleware - No CORS policy found for the specified request.
INFO  2020-04-02 10:00:09,068 [10   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'MyProjectName.Web.Controllers.AccountController.Login (MyProjectName.Web.Mvc)'
INFO  2020-04-02 10:00:09,080 [10   ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "Login", controller = "Account", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.JsonResult] Login(MyProjectName.Web.Models.Account.LoginViewModel, System.String, System.String, System.String) on controller MyProjectName.Web.Controllers.AccountController (MyProjectName.Web.Mvc).
INFO  2020-04-02 10:00:09,388 [8    ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application signed in.
INFO  2020-04-02 10:00:09,398 [8    ] tonsoftJson.NewtonsoftJsonResultExecutor - Executing JsonResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
INFO  2020-04-02 10:00:09,398 [8    ] c.Infrastructure.ControllerActionInvoker - Executed action MyProjectName.Web.Controllers.AccountController.Login (MyProjectName.Web.Mvc) in 317.9921ms
INFO  2020-04-02 10:00:09,398 [8    ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'MyProjectName.Web.Controllers.AccountController.Login (MyProjectName.Web.Mvc)'
INFO  2020-04-02 10:00:09,398 [8    ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 371.3745ms 200 application/json; charset=utf-8
INFO  2020-04-02 10:00:09,408 [9    ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://myiispc:44302/App  
INFO  2020-04-02 10:00:09,432 [9    ] uthorization.DefaultAuthorizationService - Authorization was successful.

IIS Logs when login using CHROME:

INFO  2020-04-02 09:58:43,767 [8    ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://myiispc:44302/Account/Login application/x-www-form-urlencoded; charset=UTF-8 263
INFO  2020-04-02 09:58:43,789 [8    ] tCore.Cors.Infrastructure.CorsMiddleware - No CORS policy found for the specified request.
INFO  2020-04-02 09:58:43,790 [8    ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'MyProjectName.Web.Controllers.AccountController.Login (MyProjectName.Web.Mvc)'
INFO  2020-04-02 09:58:43,807 [8    ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "Login", controller = "Account", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.JsonResult] Login(MyProjectName.Web.Models.Account.LoginViewModel, System.String, System.String, System.String) on controller MyProjectName.Web.Controllers.AccountController (MyProjectName.Web.Mvc).
INFO  2020-04-02 09:58:44,116 [7    ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application signed in.
INFO  2020-04-02 09:58:44,126 [7    ] tonsoftJson.NewtonsoftJsonResultExecutor - Executing JsonResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
INFO  2020-04-02 09:58:44,127 [7    ] c.Infrastructure.ControllerActionInvoker - Executed action MyProjectName.Web.Controllers.AccountController.Login (MyProjectName.Web.Mvc) in 319.9621ms
INFO  2020-04-02 09:58:44,127 [7    ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'MyProjectName.Web.Controllers.AccountController.Login (MyProjectName.Web.Mvc)'
INFO  2020-04-02 09:58:44,127 [7    ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 360.2291ms 200 application/json; charset=utf-8
INFO  2020-04-02 09:58:44,139 [7    ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://myiispc:44302/App  
INFO  2020-04-02 09:58:44,144 [7    ] uthorization.DefaultAuthorizationService - Authorization failed.
INFO  2020-04-02 09:58:44,145 [7    ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was challenged.
INFO  2020-04-02 09:58:44,145 [7    ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 6.5394ms 302 
INFO  2020-04-02 09:58:44,148 [14   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://myiispc:44302/Account/Login?ReturnUrl=%2FApp  

Hi All,

Thanks in advance.

After publishing my application to folder I can no longer Run/Debug MyProjectName.Web.Mvc Document: https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Deployment-Mvc-Core-IIS

Could anyone please give some insight onto what happened and how to fix ? I did not change any build configuration and it was working prior to publishing.

If I run 'dotnet run' via terminal from inside the MyProjectName.Web.Mvc the application launches.

Version: ANZ 8.2.1 Type: net core / jquery

IDE: Rider .NET Core: 3.1.2

"C:\Program Files\dotnet\dotnet.exe" C:/Users/x/source/MyProjectName/src/MyProjectName.Web.Core/bin/Debug/netcoreapp3.1/MyProjectName.Web.Core.dll
A fatal error was encountered. The library 'hostpolicy.dll' required to execute
the application was not found in 'C:\Users\x\source\MyProjectName\src\MyProjectName.Web.Co
re\bin\Debug\netcoreapp3.1\'.
Failed to run as a self-contained app. If this should be a framework-dependent a
pp, add the C:\Users\x\source\MyProjectName\src\MyProjectName.Web.Core\bin\Debug\netcoreap
p3.1\MyProjectName.Web.Core.runtimeconfig.json file specifying the appropriate framewor
k.

Process finished with exit code -2,147,450,749.
Question

@ismcagdas - Just following up on how you went a few months back on deciding on how best to deliver an updated roadmap.

Thanks again for all the hard work.

Just wanted to say thanks for version 8 - it's awesome!

You all do great work, and its nice to be acknowledged.

Dont know if you thought about adding this reference when you release the documentation for EF3.0 changes : https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-3.0/breaking-changes

Also do you have a more up to date roadmap than on the documenation site?

Thanks again and keep up the good work.

Hi All,

Thank you in advance.

I've read a some posts on here about automapper being updating to 8.1.1 and no longer supporting automapping. https://support.aspnetzero.com/QA/Questions/7402

@maliming created 2 months ago : Automapper 8.1.1 version modifies CreateMissingTypeMaps, default is false.

I've also noticed since migrating to ANZ 7.2.2 I am now having to add additional mappings that were not required in 7.0.

Example Auto mapper before ANZ 7.0 (CustomDtoMapper.cs):

configuration.CreateMap<TaxType, TaxTypeListDto>();

Example Auto mapper after update to ANZ 7.2.2 (CustomDtoMapper.cs):

configuration.CreateMap<TaxType, TaxTypeListDto>();
configuration.CreateMap<TaxType, TaxTypeDto>(); // Required to be added 

For clarification is it now a requirement to map every single mapping from model to dto, and not have automapper automatically create those mappings ?

Hi All,

Thanks in advance for any and all assistance.

I think my issue is to do with passing a parameter to the ajaxFunction appService method. the listAction call works fine if I dont try use a different function without parameters. ( example: appService.GetAllExamplesList() ).

I checked the datatable website, stack overflow, google and the forums, but I have not had any success in finding any examples of loading a datatable with a parameter such as Id.

My DataTable is throwing error : Uncaught TypeError: listAction.ajaxFunction is not a function

I am sure im doing something wrong below in my code, and it should explain what I am trying to achieve if the above was confusing.


var dataTable = $table.DataTable({
        paging: true,
        processing: false,
        stateSave: true,
        searching: true,
        listAction: {
            ajaxFunction: appService.getExampleById(exampleId)           
        },
        columns: [
            {
                 targets: 0,
                 data: "name",
                 render: function (data) {
                     return data;
                }
            }
    });

Hi All,

Thanks in advance!

I am trying to switch to using Rider IDE and everything is compiling and launching - web application works but IDE is displaying an error on _ViewStart.cshtml : Cannot resolve symbol 'GetTheme'

After navigating to the same file in VS2019 it also started complaining about not being able to resolve (never complained about this file in 4 months+).

This is the only error in the entire solution, and happens on both IDE's, but both compile and run the application.

Is this a possible bug or a mistake i've made ?

Any solutions would be greatly appreciated.

Rider: l

VS 2019:

Showing 1 to 10 of 18 entries