Hi @ismcagdas,
I've added the config you mention after JwtBearer but I still have the same issue. Can you propose a fix please ?
ERROR 2019-01-29 11:35:18,620 [24 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HLK580R1", Request id "0HLK580R1:00000002": An unhandled exception was thrown by the application.
System.ArgumentNullException: Value cannot be null.
Parameter name: stream
at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.RespondWithIndexHtml(HttpResponse response)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at ELEVEN_SOFT.Logisav.Web.Startup.Startup.<>c.<<Configure>b__5_1>d.MoveNext() in C:\Users\Ricardo Lopes\source\repos\Logisav_AspnetZero2\aspnet-core\src\ELEVEN_SOFT.Logisav.Web.Host\Startup\Startup.cs:line 168
--- End of stack trace from previous location where exception was thrown ---
at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)
at Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
https://github.com/aspnetzero/aspnet-zero-core/issues/2079
Hi Alper,
We are not talking about the same thing.
I have a lot of viewmodels based on UserDetailsViewModel.cs
that are using NullableIdDto<long> as a the base class for method argument. This case works like a charm, no problem here.
My issue is when I'm passing an other object as base class that is using NullableIdDto<long> as property like this :
public class GetNoteInput
{
**public NullableIdDto<long> NullableId { get; set; } **
public long? AddressId { get; set; }
public long? OwnerId { get; set; }
public long? OpportunityId { get; set; }
public long? ContactId { get; set; }
public long? SupplierId { get; set; }
}
I've been testing several use cases : as you know, Xamarin development can take a lot of time with these small issues.
I have more than 50 xamarin views on the project that are getting data from server without any issue... but when nullableiddto is not the base class, nullableiddto value is always passing null value to the server.
Sorry for the first message, it was maybe not clear enougth to make you understand.
Hi, I don't change any swagger code (same as zero). No change also to startup (same as zero).
I've configured it and don't know if something missing for swagger... Here is the file (i've replaced sensitive data) :
{
"ConnectionStrings": {
"Default": "Server=tcp:...."
},
"AbpZeroLicenseCode": "....",
"Abp": {
"RedisCache": {
"ConnectionString": "localhost",
"DatabaseId": -1
}
},
"App": {
"ServerRootAddress": "https://{TENANCY_NAME}.app.com/",
"ClientRootAddress": "https://{TENANCY_NAME}.app.com/",
"CorsOrigins": "https://app.com,https://app.com",
"DemoMode": "false",
"BackgroudWorkersEnabled": "true"
},
"Authentication": {
"Facebook": {
"IsEnabled": "false",
"AppId": "",
"AppSecret": ""
},
"Google": {
"IsEnabled": "false",
"ClientId": "",
"ClientSecret": ""
},
"Microsoft": {
"IsEnabled": "false",
"ConsumerKey": "",
"ConsumerSecret": ""
},
"JwtBearer": {
"IsEnabled": "true",
"SecurityKey": "App_8CFB2E",
"Issuer": "App",
"Audience": "App"
}
},
"Recaptcha": {
"SiteKey": "...",
"SecretKey": "..."
},
"IdentityServer": {
"IsEnabled": "false",
"Clients": [
{
"ClientId": "client",
"AllowedGrantTypes": [ "password" ],
"ClientSecrets": [
{
"Value": "...."
}
],
"AllowedScopes": [ "default-api" ]
}
]
},
"Payment": {
"PayPal": {
"Environment": "sandbox",
"BaseUrl": "https://api.sandbox.paypal.com/v1",
"ClientId": "...",
"ClientSecret": "...",
"DemoUsername": "...",
"DemoPassword": "..."
}
},
"Azure": {
"Storage": {
"AccountName": "appstorage",
"AccountKey": "..."
}
},
"GoogleApiV3": {
"ClientId": "apps.googleusercontent.com",
"ClientSecret": "...",
"ApplicationName": "App"
}
}
OK
As I'm trying to find performance issues, I'm digging over log files. I was wondering why I had so much warns about localization.
Tks
@ismcagdas : I tried your solution.
I've created a class called PermissionWithExternal that inherits from permission and adds a property ISExternal. I've created a PermissionWithExternalManager like you suggested on your previous comment (I've took PermissionMAnager has an example) I've also created a new PermissionDictionary class to manage PermissionWithExternal class.
Now I'm blocked with AppAuthorizationProvider cause I'm obliged to use createPermission method defined in interface IPermissionDefinitionContext (and this method uses Permission class and not PermissionWithExternal)
Is it possible to change this behavior so that I can create permissions by using my own class PermissionWithExternal ?
Great ! this is exactly what I was looking for ! I will implement base on this and give your a feedback ASAP
@ismcagdas I plan to use IsExternal in PermissionManager. I need to filter permissions displayed for standard users and for users with IsExternal set to true.
@aaron : I'm trying to implement additional property to Permission definition. I've subclassed Permission class with MyPermission. My permission has an additional boolean property called "IsExternal".
How can I create a permission based on MyPermission class ?
Do I need to create a new manager based on PermissionManager (eg: MyPermissionManager) ? I tried to do so but I'm getting lost with IPermissionDefinitionContext and AppAuthorizationProvider !
Please help, I'm getting around this for days now :shock: