Base solution for your next web application

Activities of "Riaan.Smit"

Question

Hi, I keep getting a 404 error when navigating to any of the ASPNet Zero github urls. I tried this one a few mins ago (https://github.com/aspnetzero/aspnet-zero-core/issues)

Is it only available to people part of the repo?

Regards, Riaan

Hi, I'm trying to call Sql SP's and followed the advice given in a previous question (https://support.aspnetzero.com/QA/Questions/2723#answer-9f3213f6-db7e-4866-9bbc-61c5cf17059d). However, in the example, the custom repository is created based on a concrete entity (db table - User). The SP's I need to call are all for reporting purposes, so none of the returned entities will have primary keys, and there is no need for entity tracking and the like. I created a dummy class with an id field for creating the repo's, specifically to inherit from ...RepositoryBase, but I'm sure there is a better way of doing it. Any advice will be greatly appreciated.

Regards, Riaan

That you so much for the help. Your answer resolved my issue.

Hi,

I'm in the process of building an app using the Zero template. It will be a multi-tenancy setup, and I'll have two groups (specified by Role) of users in the app. I need restrict the chat feature so that group1 can only chat to group2. Users in group1 should not be able to chat to other users in group1. Can you point me to the best place in the app to start implimenting this functionality?

Question

Hi, a few questions about SignalR integration. I have a setup with two Roles interacting, similar to Sellers and Buyers. I built a MarketPlaceHub based on the ChatHub in the Angular + Core template. The idea is that when seller performs and action, an action is executed for all online buyers. I'm stuck on testing the communication between the two roles, as the IOnlineClientManager seems to only ever have the one logged in user. I'm currently running in debug mode, and logging in as a Client via Angular, and then loggin in as a Buyer via Swagger and trying to mimic the action of two users logged in and interacting.

Is there a better way that you can suggest, or am I missing a step in registering logged in users in the OnlineClientManager? Also, is there an tutorial or example of implimenting push notification other then the Abp docs? I would like to see a simple hub implimentation that adheres to the current Zero dev standards, and the Chat function seems to have a lot of logic that is bejond somthing ans simple and forcing a component reload based on a button click by another user?

Thanx in advance! Riaan

Hi,

I'm testing interaction bewteen tenants (in debug mode), however it seems that I'm only able to be logged into one account at any one point. I tried logging into two seperate tenant accounts with incognito browsers, but as soon as I refresh, last account logged in is always the account that shows (which makes sense). Is there a way of testing seperate accounts simultaniously on the same pc while in debug mode, or can that only be done when the code is deployed?

Thank you, Riaan

When using two different broswers (chrome and firefox), it works to log into seperate accounts, for anyone else having this issue.

Hi,

I'm sorry to be asking this question again. Seems like it's been answered 10x before. I tried to follow all the previous answers, but I'm still stuck on getting the Cors policy error on most (not all) updates/deletes.

For example, I can add a new Organization Unit, but I can't delete it.

I checked both appsettings.json, and appsettings.Production.json, as below, and they seem fine. I've also enabled and disabled WebDAV on both Client and Server sites, and forced a iisreset to ensure.

Both app pools are set to "No Managed Code", and Integrated.

The Client site (Angular) is at: http://localhost:4200 The Server site (.Net Core) is at: http://localhost:9901

appsettings.json: "App": { "ServerRootAddress": "http://localhost:9901/", "ClientRootAddress": "http://localhost:4200/", "CorsOrigins": "http://localhost:4200,http://localhost:9901", "SwaggerEndPoint": "/swagger/v1/swagger.json", "AllowAnonymousSignalRConnection": "true" }

appsettings.Production.json: "App": { "ServerRootAddress": "http://localhost:9901/", "ClientRootAddress": "http://localhost:4200/", "CorsOrigins": "http://localhost:4200,http://localhost:9901" }

and in my Client site, I have this in the appconfig.json and appconfig.production.json:

"remoteServiceBaseUrl": "http://localhost:9901", "appBaseUrl": "http://localhost:4200",

I'm completely out of ideas. Any help would be greatly appreciated!

Update:

I'm note sure if this is of any help. Below is the log after trying to update a tenant's settings, and getting the Cors error:

The actual error: Access to XMLHttpRequest at 'http://localhost:9901/api/services/app/TenantSettings/UpdateAllSettings' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Log details: INFO 2019-09-03 20:41:18,935 [104 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://localhost:9901/api/services/app/TenantSettings/UpdateAllSettings
INFO 2019-09-03 20:41:18,935 [104 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful. INFO 2019-09-03 20:41:18,935 [104 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 0.8894ms 204

Hi, I tried a simpler function. When trying to update my profile settings, once logged in, I get the same error:

For the error: PUT http://localhost:9901/api/services/app/Profile/UpdateCurrentUserProfile net::ERR_ABORTED 405 (Method Not Allowed)

Access to XMLHttpRequest at 'http://localhost:9901/api/services/app/Profile/UpdateCurrentUserProfile' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This is the newtork details:

General: Request URL: http://localhost:9901/api/services/app/Profile/UpdateCurrentUserProfile Request Method: PUT Status Code: 405 Method Not Allowed Remote Address: [::1]:9901 Referrer Policy: no-referrer-when-downgrade

Reponse Headers: Allow: GET, HEAD, OPTIONS, TRACE Cache-Control: private Content-Length: 5356 Content-Type: text/html; charset=utf-8 Date: Wed, 04 Sep 2019 07:18:21 GMT Server: Microsoft-IIS/8.5

Hi @Maliming,

I resolved the issue by following the advice on on https://docs.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications

I added the <remove name="WebDAV" />, line to my web.config, but I also had to manually remove the WebDav modules listed under Handler Mappings and ISAPI Filters in IIS. Once I did that, the functions started to work.

Showing 1 to 10 of 22 entries