Base solution for your next web application

Activities of "ashjackson"

Hi There,

I am having this issue as well, in dev imperonsation works, but in live i get a 500.

I've dug in the log and it appears to be a problem with CORS

2021-02-02 12:40:00.657 +00:00 [Information] Microsoft.AspNetCore.Hosting.Diagnostics: Request starting HTTP/1.1 OPTIONS https://my.api.url/api/TokenAuth/ImpersonatedAuthenticate?impersonationToken=adf9571e-2776-472f-a2dc-273e7842df87&d=1612269598634 - 0
2021-02-02 12:40:00.657 +00:00 [Debug] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: OPTIONS requests are not supported
2021-02-02 12:40:00.657 +00:00 [Debug] Microsoft.AspNetCore.Routing.Matching.DfaMatcher: 1 candidate(s) found for the request path '/api/TokenAuth/ImpersonatedAuthenticate'
2021-02-02 12:40:00.657 +00:00 [Debug] Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware: Request matched endpoint '405 HTTP Method Not Supported'
2021-02-02 12:40:00.657 +00:00 [Debug] Microsoft.AspNetCore.Cors.Infrastructure.CorsService: The request has an origin header: 'https://my.angular.url'.
2021-02-02 12:40:00.657 +00:00 [Information] Microsoft.AspNetCore.Cors.Infrastructure.CorsService: CORS policy execution successful.
2021-02-02 12:40:00.657 +00:00 [Debug] Microsoft.AspNetCore.Cors.Infrastructure.CorsService: The request is a preflight request.
2021-02-02 12:40:00.657 +00:00 [Information] Microsoft.AspNetCore.Hosting.Diagnostics: Request finished HTTP/1.1 OPTIONS https://my.api.url/api/TokenAuth/ImpersonatedAuthenticate?impersonationToken=adf9571e-2776-472f-a2dc-273e7842df87&d=1612269598634 - 0 - 204 - - 0.3916ms
2021-02-02 12:40:00.694 +00:00 [Information] Microsoft.AspNetCore.Hosting.Diagnostics: Request starting HTTP/1.1 POST https://my.api.url/api/TokenAuth/ImpersonatedAuthenticate?impersonationToken=adf9571e-2776-472f-a2dc-273e7842df87&d=1612269598634 application/json 0
2021-02-02 12:40:00.694 +00:00 [Debug] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: POST requests are not supported
2021-02-02 12:40:00.694 +00:00 [Debug] Microsoft.AspNetCore.Routing.Matching.DfaMatcher: 1 candidate(s) found for the request path '/api/TokenAuth/ImpersonatedAuthenticate'
2021-02-02 12:40:00.694 +00:00 [Debug] Microsoft.AspNetCore.Routing.Matching.DfaMatcher: Endpoint 'MSystem.Web.Controllers.TokenAuthController.ImpersonatedAuthenticate (MSystem.Web.Core)' with route pattern 'api/TokenAuth/ImpersonatedAuthenticate' is valid for the request path '/api/TokenAuth/ImpersonatedAuthenticate'

Can this be enabled by editing the web.config?

Kind Regards, AJ.

Hi,

I've also updated to 10.2 and the same problem occurs. I've also downloaded a fresh 10.2 project and deployed that and the same error results.

Hi, Just to confirm, this has happened again when deploying to a new Azure app service with 10.1. I set the log streaming to verbose but get nothing more than the IIS error message

HTTP Error 500.30 - Internal Server Error The page cannot be displayed because an internal server error has occurred. Most likely causes:

  • IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
  • IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
  • IIS was not able to process configuration for the Web site or application.
  • The authenticated user does not have permission to use this DLL.
  • The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.

Things you can try:

  • Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
  • Check the event logs to see if any additional information was logged.
  • Verify the permissions for the DLL.
  • Install the .NET Extensibility feature if the request is mapped to a managed handler.
  • Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click <a href="http://go.microsoft.com/fwlink/?LinkID=66439">here</a>.

More Information: This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.<p><a href="http://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=500,30,0x8007023e,14393">

My other site when left overnight, just started working so I'm at a loss to point to what might be wrong here. I see others are reporting the same problem - have you been able to recreate the issue?

AJ.

Frustratingly, this error isn't happening today. The only thing that could have changed is that the app-service will have timed out and shutdown overnight (it's on the shared hosting for dev purposes, so spools down when not in use).

I see I'm not the only person who's seen this, so shall we leave this thread open for a bit as I'll be deploying a lot in the next week or so and I'll see if I can catch the cirumstances required to produce this issue and capture the log.

Kind Regards, AJ.

Prerequisites

  • What is your product version? V10.1.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .NET50

Hi There,

I am trying to deploy V10.1 to an azure app service. I have select .net50 (Early Access) and deployed the app using the publish wizard. I have tried both self contained and framework dependant publishing options and the same error occurs on both.

I get the following error message in the application log

<div class="content-container"><h3>HTTP Error 500.0 - Internal Server Error</h3><h4>The page cannot be displayed because an internal server error has occurred.</h4></div><div class="content-container"><fieldset><h4>Most likely causes:</h4><ul> 	<li>IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.</li> 	<li>IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.</li> 	<li>IIS was not able to process configuration for the Web site or application.</li> 	<li>The authenticated user does not have permission to use this DLL.</li> 	<li>The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.</li> </ul></fieldset></div><div class="content-container"><fieldset><h4>Things you can try:</h4><ul> 	<li>Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.</li> 	<li>Check the event logs to see if any additional information was logged.</li> 	<li>Verify the permissions for the DLL.</li> 	<li>Install the .NET Extensibility feature if the request is mapped to a managed handler.</li> 	<li>Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click <a href="http://go.microsoft.com/fwlink/?LinkID=66439">here</a>. </li> </ul></fieldset></div>

The web.config file generated by the deployment is as follows

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\MSystem.Web.Host.exe" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 9fc37c62-2105-4d32-9724-7323b959504b-->

Kind Regards, AJ.

Question

Prerequisites

  • What is your product version? V10.1.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? net50

Hi There,

I have some AppConsts set in the API project for various fieldlengths - are these exposed anywhere in the angular project to save duplication when validating input?

Kind Regards, AJ.

Hi There, The newest power tools version has resolved this problem. The additional module id field is no longer required.

Thanks.

Probably related - I can log in, but cannot download 10.0.0-rc1. Click generate, and the spinner shows, but then nothing happens. Re-generating 9.3.0 does work. I have selected netCore31 + Angular.

AJ.

Hi There,

CompaniesComonent is decared in main.module.ts. My power tools version is 2.7.2

AJ.

Hi there,

This is the generated json file.

{
  "IsRegenerate": false,
  "MenuPosition": "main",
  "RelativeNamespace": "Gpl.Companies",
  "EntityName": "Company",
  "EntityNamePlural": "Companies",
  "TableName": "Companies",
  "PrimaryKeyType": "Guid",
  "BaseClass": "FullAuditedEntity",
  "EntityHistory": true,
  "AutoMigration": false,
  "UpdateDatabase": false,
  "CreateUserInterface": true,
  "CreateViewOnly": true,
  "CreateExcelExport": true,
  "IsNonModalCRUDPage": false,
  "IsMasterDetailPage": false,
  "PagePermission": {
    "Host": false,
    "Tenant": true
  },
  "Properties": [
    {
      "Name": "Code",
      "Type": "string",
      "MaxLength": 6,
      "MinLength": 3,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_BusinessName",
      "Type": "string",
      "MaxLength": 250,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_Name",
      "Type": "string",
      "MaxLength": 250,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_Phone",
      "Type": "string",
      "MaxLength": 50,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_Email",
      "Type": "string",
      "MaxLength": 250,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_Address1",
      "Type": "string",
      "MaxLength": 250,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": false,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_Address2",
      "Type": "string",
      "MaxLength": 250,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": false,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_City",
      "Type": "string",
      "MaxLength": 250,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": false,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_Area",
      "Type": "string",
      "MaxLength": 250,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": false,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Contact_PostCode",
      "Type": "string",
      "MaxLength": 10,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": false,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Name",
      "Type": "string",
      "MaxLength": 250,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    }
  ],
  "NavigationProperties": [],
  "NavigationPropertyOneToManyTables": [],
  "EnumDefinitions": [],
  "DbContext": null
}

Kind regards, AJ

Showing 11 to 20 of 22 entries