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

Activities of "Astech"

We are using the UserFriendlyException to notify users that they have reached the user limit for their edition:

throw new UserFriendlyException(L("MaximumUserCount_Error_Message"), L("MaximumUserCount_Error_Detail", maxUserCount));

This results in the following:

We would like to add a second button next to OK that takes the user to the Upgrade page. How can we customise this functionality?

Many thanks

Running Zero version 10.4.0 MVC Core and getting the following error on every page. It is coming out of view-resources/Areas/App/Views/_Bundles/app-layout-libs.min.js Has anyone any ideas? Thanks

Hi,

I have just sent an email with the zipped mvc project.

Hi,

I have removed the files and tried npm install and npm run create-bundles, same result.

package.json { "name": "abpzerotemplate", "scripts": { "create-bundles": "yarn && gulp buildDev", "build": "yarn && gulp build" }, "version": "10.4.0", "dependencies": { "@fancyapps/fancybox": "^3.5.7", "@fortawesome/fontawesome-free": "^5.8.1", "@microsoft/signalr": "^3.1.2", "abp-web-resources": "5.2", "animate.css": "^3.7.0", "autosize": "^4.0.2", "block-ui": "^2.70.1", "blueimp-file-upload": "^10.2.0", "bootstrap": "4.3.1", "bootstrap-daterangepicker": "^3.0.3", "bootstrap-hover-dropdown": "^2.2.1", "bootstrap-markdown": "^2.10.0", "bootstrap-maxlength": "^1.6.0", "bootstrap-notify": "^3.1.3", "bootstrap-select": "^1.13.9", "bootstrap-switch": "3.3.4", "bootstrap-timepicker": "^0.5.2", "bootstrap-touchspin": "^4.2.5", "bootstrap4-datetimepicker": "^5.2.3", "chart.js": "^2.7.3", "chartist": "^0.11.0", "cookieconsent": "^3.1.0", "css-toggle-switch": "^4.1.0", "d3": "^5.9.1", "datatables.net": "^2.1.1", "datatables.net-bs4": "^3.2.2", "datatables.net-responsive": "^2.2.3", "datatables.net-responsive-bs4": "^2.2.3", "datatables.net-select": "^1.3.0", "detect-zoom": "^1.0.2", "dropzone": "^5.5.1", "easy-pie-chart": "^2.1.7", "famfamfam-flags": "^1.0.0", "flot": "^0.8.0-alpha", "gmaps": "^0.4.24", "gridstack": "^4.2.3", "inputmask": "^4.0.6", "ion-rangeslider": "^2.3.0", "jquery": "^3.3.1", "jquery-form": "^4.2.2", "jquery-serializejson": "^2.9.0", "jquery-slimscroll": "^1.3.8", "jquery-sparkline": "^2.4.0", "jquery-validation": "^1.19.0", "jquery.counterup": "^2.1.0", "jquery.uniform": "^4.3.0", "jqvmap": "^1.5.1", "js-beautify": "^1.13.0", "js-cookie": "^2.2.0", "js-url": "^2.3.0", "json2": "*", "jstree": "^3.3.7", "localforage": "^1.7.3", "malihu-custom-scrollbar-plugin": "^3.1.5", "moment": "^2.24.0", "moment-timezone": "^0.5.23", "morris.js": "^0.5.0", "mustache": "^3.0.1", "pace-progress": "^1.0.2", "perfect-scrollbar": "^1.4.0", "popper.js": "^1.14.7", "prismjs": "^1.16.0", "push.js": "^1.0.9", "pwstrength-bootstrap": "^3.0.5", "rangeslider.js": "^2.3.2", "raphael": "^2.2.8", "select2": "^4.0.10", "select2-bootstrap-theme": "^0.1.0-beta.10", "signalr": "^2.4.0", "simple-line-icons": "^2.4.1", "socicon": "^3.0.5", "spin.js": "^2.3.2", "sticky-js": "^1.2.0", "summernote": "^0.8.11", "sweetalert": "^2.1.2", "tether": "1.4.7", "timeago": "^1.6.5", "toastr": "^2.1.4", "tooltip.js": "^1.3.1", "topojson": "^3.0.2", "typeahead.js": "^0.11.1", "underscore": "^1.9.1", "urijs": "^1.19.1", "waypoints": "^4.0.1" }, "devDependencies": { "@types/node": "^12.7.4", "globby": "^9.2.0", "gulp": "^4.0.1", "gulp-clean-css": "^4.2.0", "gulp-concat": "^2.6.1", "gulp-less": "^4.0.1", "gulp-postcss": "^8.0.0", "gulp-uglify-es": "^1.0.4", "merge-stream": "^2.0.0", "postcss-url": "^9.0.0", "rimraf": "^3.0.0", "yarn": "^1.15.0" } }

yarn.lock https://pastebin.com/b4YaurcE

V10.4.0 - MVC - NET CORE

node v16.14.2 yarn v.2.4.0 npm v8.5.5

running npm run create-bundles generates the following error:

C:\Repos\Congresso\src\Congresso.Web.Mvc>npm run create-bundles

[email protected] create-bundles yarn && gulp buildDev

npm ERR! code ENOENT npm ERR! syscall spawn bash npm ERR! path C:\Repos\Congresso\src\Congresso.Web.Mvc npm ERR! errno -4058 npm ERR! enoent spawn bash ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\JRadu\AppData\Local\npm-cache_logs\2022-04-11T15_07_50_497Z-debug-0.log

LOG:

0 verbose cli [ 0 verbose cli 'C:\Program Files\nodejs\node.exe', 0 verbose cli 'C:\Users\\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', 0 verbose cli 'run', 0 verbose cli 'create-bundles' 0 verbose cli ] 1 info using [email protected] 2 info using [email protected] 3 timing npm:load:whichnode Completed in 1ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:C:\Users*\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 2ms 6 timing config:load:builtin Completed in 2ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 1ms 9 timing config:load:file:C:\Repos\Congresso\src\Congresso.Web.Mvc.npmrc Completed in 0ms 10 timing config:load:project Completed in 2ms 11 timing config:load:file:C:\Users*.npmrc Completed in 1ms 12 timing config:load:user Completed in 1ms 13 timing config:load:file:C:\Users*\AppData\Roaming\npm\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 1ms 15 timing config:load:validate Completed in 0ms 16 timing config:load:credentials Completed in 1ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 12ms 19 timing npm:load:configload Completed in 12ms 20 timing npm:load:setTitle Completed in 0ms 21 timing config:load:flatten Completed in 2ms 22 timing npm:load:display Completed in 4ms 23 verbose logfile C:\Users*\AppData\Local\npm-cache_logs\2022-04-11T15_07_50_497Z-debug-0.log 24 timing npm:load:logFile Completed in 51ms 25 timing npm:load:timers Completed in 0ms 26 timing npm:load:configScope Completed in 1ms 27 timing npm:load Completed in 70ms 28 silly logfile start cleaning logs, removing 2 files 29 timing command:run Completed in 13ms 30 verbose stack Error: spawn bash ENOENT 30 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19) 30 verbose stack at onErrorNT (node:internal/child_process:478:16) 30 verbose stack at processTicksAndRejections (node:internal/process/task_queues:83:21) 31 verbose pkgid [email protected] 32 verbose cwd C:\Repos\Congresso\src\Congresso.Web.Mvc 33 verbose Windows_NT 10.0.19042 34 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "create-bundles" 35 verbose node v16.14.2 36 verbose npm v8.5.5 37 error code ENOENT 38 error syscall spawn bash 39 error path C:\Repos\Congresso\src\Congresso.Web.Mvc 40 error errno -4058 41 error enoent spawn bash ENOENT 42 error enoent This is related to npm not being able to find a file. 42 error enoent 43 verbose exit -4058 44 timing npm Completed in 463ms 45 verbose code -4058 46 error A complete log of this run can be found in: 46 error C:\Users***\AppData\Local\npm-cache_logs\2022-04-11T15_07_50_497Z-debug-0.log

The mvc bundles.json:

https://pastebin.com/nngCz8s7

@sedulen - Spot on, we are using Google Chrome and the site had been added to the blocked list at some point. Many thanks for your help Kind Regards

V10.4.0 - MVC - NET CORE

File: {.Core Project}/Notifications/AppNotifier.cs

Whenever any of the calls to PublishAsync are being run in this class (including the out of the box ones like NewTenantRegisteredAsync), we are getting the following error in the browser console:

Anyone any ideas? Thanks

Prerequisites

  • What is your product version? 10.4.0
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .Net Core

Hi,

I am having trouble getting the Xamarin Signalr hub connection working. Please find all the details below:

SplashActivity.cs StartApplication:

DebugServerIpAddresses.Current = "192.168.0.22";

App.xaml.cs OnStart:

HubConnection = new HubConnectionBuilder() .WithUrl("http://" + DebugServerIpAddresses.Current + ":44301/signalr-document-conversion", (opts) => { opts.HttpMessageHandlerFactory = (message) => { if (message is HttpClientHandler clientHandler) // bypass SSL certificate clientHandler.ServerCertificateCustomValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return true; }; return message; };

}).ConfigureLogging(logging => { logging.SetMinimumLevel(LogLevel.Debug); logging.AddConsole(); logging.AddDebug(); }).Build();

MVC Startup:

        app.UseEndpoints(endpoints =>
        {
            endpoints.MapHub<AbpCommonHub>("/signalr");
            endpoints.MapHub<ChatHub>("/signalr-chat");
            endpoints.MapHub<AgendaHub>("/signalr-agenda");
            endpoints.MapHub<MinuteHub>("/signalr-minute");
            endpoints.MapHub<DocumentHub>("/signalr-document-conversion");

            endpoints.MapControllerRoute("defaultWithArea", "{area}/{controller=Home}/{action=Index}/{id?}");
            endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");

            if (bool.Parse(_appConfiguration["HealthChecks:HealthChecksEnabled"]))
            {
                endpoints.MapHealthChecks("/health", new HealthCheckOptions()
                {
                    Predicate = _ => true,
                    ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
                });
            }
			
			app.ApplicationServices.GetRequiredService<IAbpAspNetCoreConfiguration>().EndpointConfiguration.ConfigureAllEndpoints(endpoints);
        });

Exception:

09-14 15:12:00.069 I/mono-stdout( 3758): dbug: Microsoft.AspNetCore.SignalR.Client.HubConnection[40] 09-14 15:12:00.069 I/mono-stdout( 3758): Registering handler for client method 'DocumentReordered'. 09-14 15:12:00.072 I/mono-stdout( 3758): dbug: Microsoft.AspNetCore.SignalR.Client.HubConnection[40] 09-14 15:12:00.072 I/mono-stdout( 3758): Registering handler for client method 'DocumentStatusChanged'. 09-14 15:12:00.076 I/mono-stdout( 3758): dbug: Microsoft.AspNetCore.SignalR.Client.HubConnection[41] 09-14 15:12:00.076 I/mono-stdout( 3758): Starting HubConnection. 09-14 15:12:00.081 I/mono-stdout( 3758): dbug: Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[1] 09-14 15:12:00.081 I/mono-stdout( 3758): Starting HttpConnection. 09-14 15:12:00.084 I/mono-stdout( 3758): dbug: Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[8] 09-14 15:12:00.084 I/mono-stdout( 3758): Establishing connection with server at 'http://192.168.0.22:44301/signalr-document-conversion'. 09-14 15:12:00.094 V/ViewRootImpl( 3758): The specified message queue synchronization barrier token has not been posted or has already been removed 09-14 15:12:00.108 D/DecorView( 3758): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@7c425ad[MainActivity] 09-14 15:12:00.123 D/OnePlusJankManager( 3758): Chor uploadMDM JANK_TYPE_ONCE mViewTitle = com.Congresso.Mobile/crc64fd27f5768c743714.MainActivity--- jank level = 2 09-14 15:12:00.129 I/mono-stdout( 3758): fail: Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[10] 09-14 15:12:00.129 I/mono-stdout( 3758): Failed to start connection. Error getting negotiation response from 'http://192.168.0.22:44301/signalr-document-conversion'. 09-14 15:12:00.129 I/mono-stdout( 3758): System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.IO.IOException: The server returned an invalid or unrecognized response. 09-14 15:12:00.129 I/mono-stdout( 3758): at System.Net.Http.HttpConnection.FillAsync () [0x0016e] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs:1360 09-14 15:12:00.129 I/mono-stdout( 3758): at System.Net.Http.HttpConnection.ReadNextResponseHeaderLineAsync (System.Boolean foldedHeadersAllowed) [0x00259] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs:1307 09-14 15:12:00.129 I/mono-stdout( 3758): at System.Threading.Tasks.ValueTask1[TResult].get_Result () [0x0001b] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs:813 09-14 15:12:00.130 I/mono-stdout( 3758): at System.Net.Http.HttpConnection.SendAsyncCore (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00d54] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs:568 09-14 15:12:00.130 I/mono-stdout( 3758): --- End of inner exception stack trace --- 09-14 15:12:00.130 I/mono-stdout( 3758): at System.Net.Http.HttpConnection.SendAsyncCore (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x012d9] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs:743 09-14 15:12:00.130 I/mono-stdout( 3758): at System.Net.Http.HttpConnectionPool.SendWithNtConnectionAuthAsync (System.Net.Http.HttpConnection connection, System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) [0x000e6] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:330 09-14 15:12:00.130 I/mono-stdout( 3758): at System.Net.Http.HttpConnectionPool.SendWithRetryAsync (System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) [0x00101] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:296 09-14 15:12:00.130 I/mono-stdout( 3758): at System.Net.Http.RedirectHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00070] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs:32 09-14 15:12:00.130 I/mono-stdout( 3758): at Microsoft.AspNetCore.Http.Connections.Client.Internal.AccessTokenHttpMessageHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000ff] in <559e9e9efbf743acb6b2cd8b35a77f26>:0 09-14 15:12:00.130 I/mono-stdout( 3758): at Microsoft.AspNetCore.Http.Connections.Client.Internal.LoggingHttpMessageHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00095] in <559e9e9efbf743acb6b2cd8b35a77f26>:0 09-14 15:12:00.130 I/mono-stdout( 3758): at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered (System.Threading.Tasks.Task1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x000b3] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpClient.cs:531 09-14 15:12:00.130 I/mono-stdout( 3758): at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync (System.Uri url, System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILogger logger, System.Threading.CancellationToken cancellationToken) [0x0014a] in <559e9e9efbf743acb6b2cd8b35a77f26>:0 09-14 15:12:00.142 I/mono-stdout( 3758): dbug: Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[5] 09-14 15:12:00.142 I/mono-stdout( 3758): Skipping dispose, connection is already disposed. 09-14 15:12:00.162 I/mono-stdout( 3758): dbug: Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[5] 09-14 15:12:00.162 I/mono-stdout( 3758): Skipping dispose, connection is already disposed.

Hi,

I still havent managed to get this working.

Do you have any further suggestions?

Thanks.

Hi,

Yes the app works fine connecting to the api.

These are the snippets, let me know if this is what you expected to see:

` public class DocumentHub : Hub { }

app.UseEndpoints(endpoints =>
{
    endpoints.MapHub<AbpCommonHub>("/signalr");
    endpoints.MapHub<DocumentHub>("/signalr-document-conversion");

    endpoints.MapControllerRoute("defaultWithArea", "{area}/{controller=Home}/{action=Index}/{id?}");
    endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");

    }
});

await _documentHub.Clients.All.SendAsync("DocumentStatusChanged", document.Id, document.Status.ToString(), document.FileName, document.FileTypeImageName);`
Showing 41 to 50 of 77 entries