Hi @bunyamin.
Thanks for the reply. Yes, I want to use the the File Management system for a few features. Presumably the FileManagement AppService has some methods that build a ViewModel suitable for passing to ng-zorro. Is there any documentation around it's API so I can look at re-using it?
Thanks, Greg
Hi yea, sorry.
I want to allow the user to select a file from the file manager and associate it with an entity.
Obviously I'll need some kind of property on my entity to store the reference.
Let's say I have an Application Form entity and I want a Signed Copy attaching to it. I'd like the user to click a button to spawn the file browser (the tree view in file management) and then be able to browse and select a file. I imagine the file browser would give me back an Id or a FileDto which has the Id and/or virtual path to the file. I can then store this Id in my entity.
I want to integrate the file management system into my UI. I want my users to be able to select a file to associate it with an entity.
How can I put a file picker component in my Angular component so the user can pick a file from the File Mangement system?
Suite is generating invalid C#. It's looks like it's leaving a replacement token on the end of property definitions.
I'm using Suite 3.3.1
[StringLength(BomListConsts.DescriptionMaxLength)]
public string Description { get; set; } %%initial-value%%
I've tried creating a brand new Suite project and adding a simple Foo entity with a sinle int property and I get the following code for the DTOs.
public class FoooCreateDto
{
public int? F1 { get; set; } %%initial-value%%
}
public class FoooDto : FullAuditedEntityDto<Guid>
{
public int? F1 { get; set; } %%initial-value%%
}
public class FoooUpdateDto
{
public int? F1 { get; set; } %%initial-value%%
}
The tool is absolutely unusable and I've wasted half a day trying different things to get it working thinking it was something wrong with my object definition.
This is unacceptable.
Please advise
ok, thanks 👍🏻
@armanozak I'm pretty new with Angular and ABP. Is there anything we need to take into account with the service proxies that ABP gives us or do they play nicely with service workers?
Can I share those privately?
Hi @liangshiwei,
I've deleted the database, changed the migrator appsettings.json as you describe and re-run the migrator against a new empty database and the problem persists.
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
500 Internal Server Error UNAUTHORIZED_CLIENT
2020-11-02 11:04:48.240 +00:00 [ERR] Invalid redirect_uri: https://dev-web.example.com/ {"ClientId":"Example_App","ClientName":"Example_App","RedirectUri":null,"AllowedRedirectUris":["https://dev-api.example.com","https://dev-web.example.com"],"SubjectId":"anonymous","ResponseType":null,"ResponseMode":null,"GrantType":null,"RequestedScopes":"","State":null,"UiLocales":null,"Nonce":null,"AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":null,"MaxAge":null,"LoginHint":null,"SessionId":null,"Raw":{"response_type":"code","client_id":"Example_App","state":"MldHMGt1TnZkS0ItcnBXQzU1WGROck9LTWp5MGlzdFJEdjV0UE9sMS5DUjdD","redirect_uri":"https://dev-web.example.com/","scope":"openid offline_access Example","code_challenge":"vXXK9P8NZ7zMPbzktJetY4amyp5F1sqWU-rYTpQPJ3c","code_challenge_method":"S256","nonce":"MldHMGt1TnZkS0ItcnBXQzU1WGROck9LTWp5MGlzdFJEdjV0UE9sMS5DUjdD"},"$type":"AuthorizeRequestValidationLog"}
import { Config } from '@abp/ng.core';
const baseUrl = 'https://dev-web.example.com/';
export const environment = {
production: true,
application: {
baseUrl,
name: 'Example',
},
oAuthConfig: {
issuer: 'https://dev-api.example.com',
redirectUri: baseUrl,
clientId: 'Example_App',
responseType: 'code',
scope: 'offline_access Example',
},
apis: {
default: {
url: 'https://dev-api.example.com',
rootNamespace: 'Example',
},
},
} as Config.Environment;
"build:dev": "ng build --configuration development"
and yarn build:dev
{
"ConnectionStrings": {
"Default": "Server=localhost\\sqlexpress;Database=Example-Dev;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"IdentityServer": {
"Clients": {
"Example_Web": {
"ClientId": "Example_Web",
"RootUrl": "https://dev-web.example.com/"
},
"Example_App": {
"ClientId": "Example_App",
"RootUrl": "https://dev-api.example.com/"
},
"Example_Blazor": {
"ClientId": "Example_Blazor",
"RootUrl": "https://localhost:44307"
}
}
},
"AbpLicenseCode": "..."
}
{
"App": {
"SelfUrl": "https://dev-api.example.com/",
"ClientUrl": "https://dev-web.example.com/",
"CorsOrigins": "http://dev-web.example.com/,https://dev-web.example.com/"
},
"ConnectionStrings": {
"Default": "Server=localhost\\SQLExpress;Database=Example-Dev;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"AuthServer": {
"Authority": "https://dev-api.example.com",
"RequireHttpsMetadata": "true"
},
}
The Issue
I can browse the Swagger document and the Angular app fine, but when I try to log in I get the error screen from the API stating
500
Internal Server Error
UNAUTHORIZED_CLIENT
and the following messages in the log 2020-11-02 11:04:48.240 +00:00 [ERR] Invalid redirect_uri: https://dev-web.example.com/ {"ClientId":"Example_App","ClientName":"Example_App","RedirectUri":null,"AllowedRedirectUris":["https://dev-api.example.com","https://dev-web.example.com"],"SubjectId":"anonymous","ResponseType":null,"ResponseMode":null,"GrantType":null,"RequestedScopes":"","State":null,"UiLocales":null,"Nonce":null,"AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":null,"MaxAge":null,"LoginHint":null,"SessionId":null,"Raw":{"response_type":"code","client_id":"Example_App","state":"MldHMGt1TnZkS0ItcnBXQzU1WGROck9LTWp5MGlzdFJEdjV0UE9sMS5DUjdD","redirect_uri":"https://dev-web.example.com/","scope":"openid offline_access Example","code_challenge":"vXXK9P8NZ7zMPbzktJetY4amyp5F1sqWU-rYTpQPJ3c","code_challenge_method":"S256","nonce":"MldHMGt1TnZkS0ItcnBXQzU1WGROck9LTWp5MGlzdFJEdjV0UE9sMS5DUjdD"},"$type":"AuthorizeRequestValidationLog"}
What's wrong, and what is the processess for deploying an appilcation to a live environment?
I'm facing the same issue. I've just deployed my project to a staging server for my client to look at and I'm getting an Invalid Redirect URI error, but I can't see how or where I'm supposed to set it. The URL in the log is http, but all my settings are HTTPS so I don't know where it's coming from.
Is there any documentation about deploying to a live environment and what changes you're supposed to make?
Cheers, Greg