Base solution for your next web application

Activities of "Riaan.Smit"

Hi Maliming,

The value is set on the client side. It's in abp.js correct? That's the only place I could find to set it. Is there somewhere else I also need to set it?

Hi, I'm working on an Angular, .net Core project (downloaded in July 2019).

After deploying to production, and realizing that the prod server is running nginx (resulting in not being able to change the tenant), I followed the below threads to update my code:

https://github.com/aspnetboilerplate/aspnetboilerplate/pull/4349/files https://stackoverflow.com/questions/49783689/cannot-get-header-that-contains-a-period-from-nginx?answertab=active#tab-top

Now I can't change the Tenant in my Dev environment. I changed all the references to Abp.TenantId to Abp-TenantId in both server and client project, and I can see the cookie getting set to Abp-TenantId, however the Tenant is never changed.

I'm not sure if I'm missing something? ANy help or advise will be greatly appreciated!

-----Update

It seems that the AbpSession.TenantId is never set, but I can't find where the property is actually set to check what is going on there.

And on a side note, should the header .AspNetCore.Culture not also be changed to AspNetCore-Culture?

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.

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,

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

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

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

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 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?

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

Showing 11 to 20 of 22 entries