Hi @ismcagdas !
Nope, not at all ...
Anyway, right now it is not that important, because use-cases for host to use file-management are not to be implemented soon. And for tenants everything is working fine.
It's just that, I can't explain what is going on in this service ... why would it work for tenants but not for host users? There is really nothing special in there.
Have a nice weekend @all
This is from App_Data\Logs\Logs.txt
:
INFO 2019-01-25 07:23:39,777 [3 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action CompanyName.ProjectName.Web.Controllers.HomeController.Index (CompanyName.ProjectName.Web.Host) in 7.5609ms
INFO 2019-01-25 07:23:39,777 [3 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'CompanyName.ProjectName.Web.Controllers.HomeController.Index (CompanyName.ProjectName.Web.Host)'
INFO 2019-01-25 07:23:39,777 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 77.0956ms 302
INFO 2019-01-25 07:24:00,718 [6 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://projectname.azurewebsites.net/api/services/app/FileManagerBackend/GetAllAsync?Name=
INFO 2019-01-25 07:24:00,718 [6 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-01-25 07:24:00,734 [6 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 1.7097ms 204
INFO 2019-01-25 07:24:00,796 [18 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://projectname.azurewebsites.net/api/services/app/FileManagerBackend/GetAllAsync?Name=
INFO 2019-01-25 07:24:00,796 [18 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-01-25 07:24:00,796 [18 ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
WARN 2019-01-25 07:24:00,796 [18 ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported cultures 'null'.
WARN 2019-01-25 07:24:00,796 [18 ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported UI Cultures 'null'.
WARN 2019-01-25 07:24:00,796 [18 ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported cultures 'null'.
WARN 2019-01-25 07:24:00,796 [18 ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported UI Cultures 'null'.
INFO 2019-01-25 07:24:00,796 [18 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'CompanyName.ProjectName.Backend.FileManagement.FileManagerBackendAppService.GetAllAsync (CompanyName.ProjectName.Application)'
INFO 2019-01-25 07:24:00,812 [18 ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {area = "app", action = "GetAllAsync", controller = "FileManagerBackend"}. Executing action CompanyName.ProjectName.Backend.FileManagement.FileManagerBackendAppService.GetAllAsync (CompanyName.ProjectName.Application)
INFO 2019-01-25 07:24:00,812 [18 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-01-25 07:24:00,812 [18 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method CompanyName.ProjectName.Backend.FileManagement.FileManagerBackendAppService.GetAllAsync (CompanyName.ProjectName.Application) with arguments (CompanyName.ProjectName.Backend.FileManagement.Dto.FileObjectFilterBackendDto) - Validation state: Valid
DEBUG 2019-01-25 07:24:15,015 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules...
DEBUG 2019-01-25 07:24:15,124 [1 ] Abp.Modules.AbpModuleManager - Found 23 ABP modules in total.
DEBUG 2019-01-25 07:24:15,190 [1 ] Abp.Modules.AbpModuleManager - Loaded module: CompanyName.ProjectName.Web.Startup.ProjectNameWebHostModule, CompanyName.ProjectName.Web.Host, Version=6.5.0.0, Culture=neutral, PublicKeyToken=null
This is what azure log stream has to say about it:
HTTP Error 502.3 - Bad Gateway
The connection with the server was terminated abnormally
Most likely causes:
- The CGI application did not return a valid set of HTTP errors.
- A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.
Things you can try:
- Use DebugDiag to troubleshoot the CGI application.
- Determine if a proxy or gateway is responsible for this error.
Detailed Error Information:
Module
AspNetCoreModuleV2
Notification
ExecuteRequestHandler
Handler
aspNetCore
Error Code
0x80072efe
Requested URL
https://projectname:80/api/services/app/FileManagerBackend/GetAllAsync?Name=
Physical Path
D:\home\site\wwwroot\api\services\app\FileManagerBackend\GetAllAsync
Logon Method
Anonymous
Logon User
Anonymous
More Information:
This error occurs when a CGI application does not return a valid set of HTTP headers, or when a proxy or gateway was unable to send the request to a parent gateway. You may need to get a network trace or contact the proxy server administrator, if it is not a CGI problem.
Hi @aaron!
projectname.azurewebsites.net
is the .Net application
projectname-be.azurewebsites.net
is the angular client (one of three)
If you don't want to go with the branch-based approach, you could also go with comparing project content using tools like Code Compare (easy to use) or WinMerge (works the same way, but needs configuration). It might be a more time-consuming process, though (depending on your own changes to existing ASPNETZERO code). Also, make sure to have a backup of some sort (if you don't use version-control at all).
But maybe it would make more sense to call it 'Disabled' on the UI !? I think that would better reflect it's purpose.
Hi @aaron!
Yes, that makes perfect sense, obviously!
Shame on me :D
Actually, I really think the problem is AccountAppService.ActivateEmail()
not setting User.IsActive
to true
.
Here's the code of current version (6.5.0) (but it is the same down to 4.5.1, which is the earliest version i have):
public async Task ActivateEmail(ActivateEmailInput input)
{
var user = await UserManager.GetUserByIdAsync(input.UserId);
if (user == null || user.EmailConfirmationCode.IsNullOrEmpty() || user.EmailConfirmationCode != input.ConfirmationCode)
{
throw new UserFriendlyException(L("InvalidEmailConfirmationCode"), L("InvalidEmailConfirmationCode_Detail"));
}
user.IsEmailConfirmed = true;
user.EmailConfirmationCode = null;
await UserManager.UpdateAsync(user);
}
Is there any reason to not set User.IsActive
to true
?
In database I can see the following:
After creating a new user:
After clicking the activation-code in e-mail:
I think the problem here is that IsActive is still false. AccountAppService.ActivateEmail() does not set IsActive to true. But I'm not sure if that is on purpose.