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)
6.5.0, Angular, .Net Framework deployed to azure
I have a rather strange issue here ...
I have a service for file-management, a page 'file-management' that communicates with the service, as well as a modal that can be used by other components. When using the file-management component, the first request is fired to get meta-data to display a list of files and folders.
When I'm using a tenant-account everything is working fine.
But when I'm using a host-account I get a an error related to CORS (browser console):
Access to fetch at 'https://projectname.azurewebsites.net/api/services/app/FileManagerBackend/GetAllAsync?Name=' from origin 'https://projectname-be.azurewebsites.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Next thing that happens is the application crashing (server-side) resulting in following error message (browser console):
GET https://projectname.azurewebsites.net/api/services/app/FileManagerBackend/GetAllAsync?Name= 504 (Gateway Timeout)
and
ERROR Error: An unexpected server error occurred.
After a while the application is back running fine.
Also, this does not happen in development environment (localhost).
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.
Version: 6.5.0, Asp.Net Core & Angular
Hi! Currently, I'm facing problems with the activation-code sent via e-mail being invalid (for both tenant- and user-registration). This is the case for my own project hosted in Azure as well as for the demo provided by ASPNETZERO (user-registration).
Is there something wrong with e-mail-activation?