Base solution for your next web application

Activities of "dmux"

I have a new project which works in my local Visual Studio debug mode. I used this document https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Setting-Up-an-Azure-Pipeline-Mvc-Core to configure my Azure pipeline. The app builds and deploys, but when I browse to it I see the login page with the wrong font and the "Log In" button does not work. I look at the browser Developer Mode to find errors being thrown like this:

This looks like the problem I first had when I started the project without running yarn or NPM. I have the yarn and NPM in my pipeline definition. Perhaps there is a clue in the output log (in the Pipeline log), because I don't know whether remarks like "The platform "win32" is incompatible with this module" (in the yarn log) are important:

yarn Build Job

##[debug]Getting credentials for local feeds SYSTEMVSSCONNECTION exists true ##[debug]SYSTEMVSSCONNECTION exists true ##[debug]Got auth token ##[debug]System.ServerType=Hosted ##[debug]Agent.ProxyUrl=undefined ##[debug]Getting URI for area ID 4C83CFC1-F33A-477E-A789-29D38FFCA52E from https://-myAzure-.visualstudio.com/ ##[debug]Getting credentials for local feeds SYSTEMVSSCONNECTION exists true ##[debug]SYSTEMVSSCONNECTION exists true ##[debug]Got auth token ##[debug]Agent.ProxyUrl=undefined ##[debug]Acquiring Packaging endpoints from https://-myAzure-.pkgs.visualstudio.com/ ##[debug]Successfully acquired the connection data ##[debug]Acquired location ##[debug]{"PackagingUris":["https://-myAzure-.visualstudio.com/","https://-myAzure-.pkgs.visualstudio.com/","https://pkgsprodeau1.pkgs.visualstudio.com/","https://-myAzure-.pkgs.visualstudio.com/","https://-myAzure-.pkgs.visualstudio.com/","https://pkgs.dev.azure.com/-myAzure-/"],"DefaultPackagingUri":"https://-myAzure-.pkgs.visualstudio.com/"} ##[debug]C:\npm\prefix\yarn.cmd ##[debug]Build.BuildId=1378 ##[debug]Agent.BuildDirectory=d:\a\1 ##[debug]testing directory 'd:\a\1\npm' ##[debug]testing directory 'd:\a\1' ##[debug]mkdir 'd:\a\1\npm' ##[debug]Using registries in .npmrc ##[debug]customEndpoint=null ##[debug]which 'yarn' ##[debug]found: 'C:\npm\prefix\yarn.cmd' ##[debug]which 'yarn' ##[debug]found: 'C:\npm\prefix\yarn.cmd' ##[debug]ProductionMode=false ##[debug]OverridingProjectNpmrc: d:\a\1\s\src\DMux.WebPortal.Web.Mvc.npmrc ##[debug]rm -rf d:\a\1\s\src\DMux.WebPortal.Web.Mvc.npmrc ##[debug]exec tool: C:\npm\prefix\yarn.cmd ##[debug]arguments: C:\windows\system32\cmd.exe /D /S /C "C:\npm\prefix\yarn.cmd" yarn install v1.19.1 warning package.json: No license field warning [email protected]: No license field [1/4] Resolving packages... [2/4] Fetching packages... warning [email protected]: Unable to read "./man" directory of module "json2" warning [email protected]: Unable to read "./man" directory of module "joosex-simplerequest" warning [email protected]: Unable to read "./man" directory of module "joose" warning [email protected]: Unable to read "./man" directory of module "joosex-namespace-depended" 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 " > [email protected]" has incorrect peer dependency "bootstrap@^3.1.1". warning " > [email protected]" has incorrect peer dependency "[email protected]". warning "js-url > [email protected]" has unmet peer dependency "grunt@>=1.0.3". [4/4] Building fresh packages... Done in 63.61s. ##[debug]Exit code 0 received from tool 'C:\npm\prefix\yarn.cmd' ##[debug]STDIO streams have closed for tool 'C:\npm\prefix\yarn.cmd' ##[debug]rm -rf d:\a\1\s\src\DMux.WebPortal.Web.Mvc.npmrc ##[debug]removing file ##[debug]RestoringProjectNpmrc ##[debug]Agent.BuildDirectory=d:\a\1 ##[debug]rm -rf d:\a\1\npm\1378.npmrc ##[debug]removing file ##[debug]task result: Succeeded ##[debug]Processed: ##vso[task.complete result=Succeeded;]Yarn executed successfully ##[debug]Agent.BuildDirectory=d:\a\1 ##[debug]rm -rf d:\a\1\npm ##[debug]removing directory Finishing: Yarn

NPM Build Job

##[debug]Evaluating condition for step: 'NPM Build Job' ##[debug]Evaluating: succeeded() ##[debug]Evaluating succeeded: ##[debug]=> True ##[debug]Result: True Starting: NPM Build Job

Task : Command line Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows Version : 2.151.2 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line

##[debug]VstsTaskSdk 0.9.0 commit 6c48b16164b9a1c9548776ad2062dad5cd543352 ##[debug]Entering D:\a_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.151.2\cmdline.ps1. ##[debug]Loading resource strings from: D:\a_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.151.2\task.json ##[debug]Loaded 6 strings. ##[debug]SYSTEM_CULTURE: 'en-US' ##[debug]Loading resource strings from: D:\a_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.151.2\Strings\resources.resjson\en-US\resources.resjson ##[debug]Loaded 6 strings. ##[debug]INPUT_FAILONSTDERR: 'false' ##[debug] Converted to bool: False ##[debug]INPUT_SCRIPT: 'cd src/DMux.WebPortal.Web.Mvc ##[debug]npm run build' ##[debug]INPUT_WORKINGDIRECTORY: 'd:\a\1\s' ##[debug]Asserting container path exists: 'd:\a\1\s' Generating script. ##[debug]AGENT_VERSION: '2.159.2' ##[debug]AGENT_TEMPDIRECTORY: 'd:\a_temp' ##[debug]Asserting container path exists: 'd:\a_temp' ##[debug]Asserting leaf path exists: 'C:\windows\system32\cmd.exe' ========================== Starting Command Output =========================== ##[debug]Entering Invoke-VstsTool. ##[debug] Arguments: '/D /E:ON /V:OFF /S /C "CALL "d:\a_temp\42efb6de-fddf-4c1d-becb-0056851d297f.cmd""' ##[debug] FileName: 'C:\windows\system32\cmd.exe' ##[debug] WorkingDirectory: 'd:\a\1\s' "C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "d:\a_temp\42efb6de-fddf-4c1d-becb-0056851d297f.cmd""

[email protected] build D:\a\1\s\src\DMux.WebPortal.Web.Mvc gulp build

[02:35:56] Using gulpfile D:\a\1\s\src\DMux.WebPortal.Web.Mvc\gulpfile.js [02:35:56] Starting 'build'... [02:37:55] Finished 'build' after 1.97 min ##[debug]Exit code: 0 ##[debug]Leaving Invoke-VstsTool. ##[debug]Leaving D:\a_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.151.2\cmdline.ps1. Finishing: NPM Build Job

In my Release definition I have this as the "Package or Folder" to deploy:

$(System.DefaultWorkingDirectory)**\DMux.WebPortal.Web.Mvc.zip

Should I include other files...?

Can someone please point me in the right direction?

  • Kevin

My unit tests all work in Visual Studio, but I get errors in the Azure pipeline.

This is the error with some possible clues in the preceeding lines:

Test run will use DLL(s) built for framework .NETCoreApp,Version=v2.2 and platform X86. Following DLL(s) do not match framework/platform settings. xunit.runner.visualstudio.dotnetcore.testadapter.dll is built for Framework 1.0 and Platform AnyCPU. xunit.runner.visualstudio.dotnetcore.testadapter.dll is built for Framework 1.0 and Platform AnyCPU. xunit.runner.visualstudio.dotnetcore.testadapter.dll is built for Framework 1.0 and Platform AnyCPU. Go to http://go.microsoft.com/fwlink/?LinkID=236877&clcid=0x409 for more details on managing these settings. ##[error]Unable to find d:\a\1\s\test\DMux.WebPortal.GraphQL.Tests\bin\Debug\netcoreapp2.2\DMux.WebPortal.GraphQL.Test.Base.deps.json. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk". ##[debug]Processed: ##vso[task.logissue type=error;]Unable to find d:\a\1\s\test\DMux.WebPortal.GraphQL.Tests\bin\Debug\netcoreapp2.2\DMux.WebPortal.GraphQL.Test.Base.deps.json. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk".

The project does have the Nuget package:

But I wonder if the AnyCPU is relevant? My Pipeline is configured for AnyCPU, and the unit test project is too.

Can someone suggest anything?

  • Kevin

When querying the App Services as an API call, the return object looks like this:

{ "result": { -The serialized POCO object Swagger is advertising- }, "targetUrl": string, "success": bool, "error": string, "unAuthorizedRequest": bool, "__abp": bool }

While it's easy enough to unwrap the object once you know what to expect, unfortunately the auto-generated client code created by the Swagger/NSwag tool creates code which is broken because it is not expecting the wrapper. This means if I regenerate the client code I need to go through it fixing the deserialisation routines again.

Can we somehow tell Swagger to include the wrapper object in its advertised schema? This would mean the generated code would automatically have the correct objects to deserialise correctly (It would also mean Swagger reports its schema truthfully, which seems desirable).

Apparently ASPNetZero used to include meronic's Calendar control but no longer includes it. Is this correct?

If so, how do I install https://fullcalendar.io/ into my MVC DontNet Core v7.2.0 project?

I have tried a bunch of things from instructions I found online. The instructions I found seemed to assume things that were not valid in my project and I didn't know how to resolve the issues. It seems the instructions all assume Angular.

Can someone provide steps that will suit my project?

I am exploring the new Customizable Dashboards and I'm excited about implementing this feature.

I noticed that if my user does not have the AppPermissions.Pages_Administration_AuditLogs permission, the dashboard does not get populated and they have no widgets available. (I note the generalStats widget adds the AppPermissions.Pages_Administration_AuditLogs to its permissions but I can't see why that would cause a problem).

I managed to work around this in the short term by adding the AppPermissions.Pages_Tenant_Dashboard permission to the AuditLogAppService, but I couldn't see exactly where this dependency was introduced. Of course, my workaround is not ideal, so maybe someone can identify the root cause.

Also a question: I am looking at setting up a library of widgets as partial html files, which are inserted at runtime. But is this something you guys are planning to develop soon? If so I'll hold off and just keep using the pattern you have set up so that upgrades are simpler.

I am using Visual Studio 16.3.10, because I udpated 16.4 Preview 4 to Preview 6 and it seemed to cause serious problems. So I uninstalled it and went back to the released version. Then I installed the RAD Tool (2.1).

My project is ASPNETCore MVC v8.0

I have just discovered that the RAD tool is now producing sections of javascript that gulp rejects. As far as I can tell the offending code is in the datatable listAction in the generated index.js, where it is defining the inputFilter parameters for the query. It looks like it is putting placeholders in and not substituting values.

Original code (produced previously by RAD tool):

        var dataTable = _$productsTable.DataTable({
            paging: true,
            serverSide: true,
            processing: true,
            listAction: {
                ajaxFunction: _productsService.getAll,
                inputFilter: function () {
                    return {
					filter: $('#ProductsTableFilter').val(),
					codeFilter: $('#CodeFilterId').val(),
					nameFilter: $('#NameFilterId').val(),
					chemCheckFilter: $('#ChemCheckFilterId').val(),
					minMultiPartyMeetingsFilter: $('#MinMultiPartyMeetingsFilterId').val(),
					maxMultiPartyMeetingsFilter: $('#MaxMultiPartyMeetingsFilterId').val(),
					midpointReviewFilter: $('#MidpointReviewFilterId').val(),
					finalReviewFilter: $('#FinalReviewFilterId').val(),
					progressReportsFilter: $('#ProgressReportsFilterId').val(),
					programTypeNameFilter: $('#ProgramTypeNameFilterId').val()
                };
              }
           },

Code being produced now:

var dataTable = _$productsTable.DataTable({
            paging: true,
            serverSide: true,
            processing: true,
            listAction: {
                ajaxFunction: _productsService.getAll,
                inputFilter: function () {
                    return {
					filter: $('#ProductsTableFilter').val(),
					{{Dp_Property_Name_Here}}Filter: $('#CodeFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#NameFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#ChemCheckFilterId').val(),
					minMultiPartyMeetingsFilter: $('#MinMultiPartyMeetingsFilterId').val(),
					maxMultiPartyMeetingsFilter: $('#MaxMultiPartyMeetingsFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#MidpointReviewFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#FinalReviewFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#ProgressReportsFilterId').val(),
					minConsultationsFilter: $('#MinConsultationsFilterId').val(),
					maxConsultationsFilter: $('#MaxConsultationsFilterId').val(),
					minHoursFilter: $('#MinHoursFilterId').val(),
					maxHoursFilter: $('#MaxHoursFilterId').val(),
					{{Dp_Property_Name_Here}}Filter: $('#MoodleAccessFilterId').val(),
					programTypeNameFilter: $('#ProgramTypeNameFilterId').val()
                    };
                }
            },

It seems the int data types have their filter names, but the string and bool data types have this {{Dp_Property_Name_Here}} placeholder instead.

It seems this is what causes npm run build to throw an error:

npm : [22:27:44] 'build' errored after 3.41 s At line:1 char:1 npm run build

  • CategoryInfo : NotSpecified: ([22:27:44...ed after 3.41 s:String) [], RemoteException
  • FullyQualifiedErrorId : NativeCommandError [22:27:44] SyntaxError in plugin "gulp-uglify-es" Message: Unexpected token: punc ({) Details: filename: Index.js line: 48 col: 5 pos: 1747 domainEmitter: [object Object] domain: [object Object] domainThrown: false

I can confirm that when I replace the {{Dp_Property_Name_Here}} with the appropriate filter name, I can then run npm run build.

So this is now a manual step I need to take any time I run the RAD tool. Any help to resolve it will be appreciated.

Any ideas how I can overcome this?

I want to use this time-picker: http://vitalets.github.io/clockface/#

It works, except the layout of its elements gets mucked up due to something in css. I can't figure out what is causing the problem.

I'm expecting this:

I'm seeing this:

If I remove the clockface.css from my bundles I see this:

I am using it in a modal.

I have experimented with adding the css to different bundles in case it is conflicting with something. Unfortunately css is not my strong suit. I do notice that wwwroot\metronic\assets\global\css has a couple of .clockface entries, but I don't know what to do with that.

Any help will be appreciated.

I see the warning in my debug console about the upcoming change to Chrome. The message reads:

A cookie associated with a resource at http://uat.trevor-roberts.com.au/ was set with SameSite=None but without Secure. A future release of Chrome will only deliver cookies marked SameSite=None if they are also marked Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5633521622188032

The latest advice is this will come into effect in a couple of weeks: https://www.chromium.org/updates/same-site

Please advise if we need to do anything to ensure features like "Login as user", etc. continue to work.

When a modal window opens, if it is too long for the screen I can scroll vertically. All good.

But if the modal has a selector which launches another child modal (Like the RAD Tool controls for selecting child objects), I can't scroll after opening and closing the child modal.

This kind of selector makes the issue happen:

After opening the child modal and closing it, the vertical scroll is attached to the screen behind the modal, not the modal itself.

What can I do to reset the scroll? In Javascript I can detect the child modal closing if I need to, so I can trigger something. I just don't know what I would need to do. I imagine I would be setting a vertical-scroll styling property on the modal container element or something...?

Any help would be appreciated.

Hi Guys,

Once again, I really love the RAD tool!

But some time between Feb 9 and Feb 22, something changed, and that broke stuff without me realising straight away, and that stung me. (Look, maybe I reinstalled my VS about then, and got a new version of the RAD tool...?)

It looks like it now has a "ViewType" property on the NavigationProperty. This is a cool feature, being able to have a dropdown... But the tool auto-populates the property with value "null", so when I regenerated some entities I didn't realise it just left out the selectors altogether from the modal. That means using the auto-generated modal now throws an error because the foreign keys are not set. It would be better if it auto-populated it with "LookupTable" for backwards compatibility.

Now that I have figured this out I'm going back through all the entity json files and populating the property.

I hope this is helpful.

Thanks again for the great tool.

Showing 1 to 10 of 14 entries