Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "adam.langley"

I am using AspNetZero Core+Angular.

I am receiving an "internal server error" response to an ajax call, but there is no output in the log file to figure out what is throwing the exception.

The HTTP response looks like this:

{"error":"Internal Server Error","result":null,"success":false}

And there are no errors in the Log.txt (there is Info logging, so I know logging is working).

I have writing an exception handler, but it never fires.

public class MyExceptionHandler : IEventHandler<AbpHandledExceptionData>, ITransientDependency
{
    public void HandleEvent(AbpHandledExceptionData eventData)
    {
        //TODO: Check eventData.Exception!
    }
}

I have tried overriding the exception filter which (I think) is producing the ajax wrapped exception response object, and injected it - but it also does not fire.

public class MyExceptionFilter : AbpExceptionFilter, ITransientDependency
{

    public MyExceptionFilter(IErrorInfoBuilder errorInfoBuilder, IAbpAspNetCoreConfiguration configuration)
        :base(errorInfoBuilder, configuration)
    {
    }

    protected override void HandleAndWrapException(ExceptionContext context, WrapResultAttribute wrapResultAttribute)
    {
        base.HandleAndWrapException(context, wrapResultAttribute);
    }

}

Where do I go from here?

Thanks

Prerequisites

  • What is your product type: Angular
  • What is product framework type .net core

I have a basically default template, and everything works on localhost, but not when I deploy to Azure.

My Azure deployment is, the Angular site is hosted as an Azure Blob Storage static website, and the .net Core API is an App Service.

These are the symptoms I am experiencing.

  1. When using the default CORS code (I have added my blob storage URI to the CorsOrigins setting "http://MYREDACTEDSITE.z8.web.core.windows.net"), I get the dreaded "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource." When I check the various response headers, I indeed see that no CORS origins header exists.
  2. When I use Azure App Service CORS settings, and add the wildcard origin ( * ) it works - but SignalR doesnt work. I have read various ABP and Zero forum postings where it is said "dont use Azure CORS" - so I'd rather rely on the C# code.
  3. When I use Azure App Service CORS specific origin host it does NOT work - again, I see no CORS headers are returned - this is weird, wildcard returns the headers, but specific hosts do not?
  4. I. have also commented out the code in Startup.cs, and replace it with Rick Strahls "enable all origins" code (see below) to rule out the possibility that my config is not being picked up somehow. Also this does not work.

Note: I do ensure that I reset the Azure CORS config when I'm testing the ASP ones

Thanks,

Appendix: Rick Strahls enable all origins

        services.AddCors(options =>
        {
            options.AddPolicy(DefaultCorsPolicyName,
                builder => builder.AllowAnyOrigin()
                .AllowAnyMethod()
                .AllowAnyHeader()
                .AllowCredentials());
        });
Question

Hi,

I am building a mobile front-end for our application - and the requirement for the user to enter the tenant name is cumbersome.

For the web, this makes sense, and is not a problem, because each customer will be given a custom domain (3rd level), which provides the requisite tenancy information for the backend code.

For mobile applications, however - one cannot create a copy of the app in the app store, for each tenant (Apple app store violation - and would also just be a PITA) - so I understand why the user needs to specify a tenant when logging in.

It is, however, cumbersome for the user.

I could provide a dropdown to choose the tenant - however, because this would need to be a public API call (unauthenticated), it's a security/privacy concern - exposing the list of customer names.

Ideally, the user would log in using email/password, then be presented with a list of all tenancies which matched those credentials, allowing the user to pick one.

What would be your recommendation around achieving this?

I'm getting "ABP.io" search results coming up while Im trying to researching topics on my ASP.NET Zero site.

I'd like to know, it appears that ABP and aspnetboilerplate are both Volosoft (as are their paid counterparts) - what is the difference between ABP them all?

Thanks,

I have written an IAsyncActionFilter which needs to access the UOW after the Controller has executed its action.

My ActionFilter consumes IDbContextProvider<ProductDbContext> so that I can call "GetDbContext" after the inner action has executed.

When I do so however, I get:

System.ArgumentNullException: Value cannot be null. (Parameter 'unitOfWork') at Abp.EntityFrameworkCore.Uow.UnitOfWorkExtensions.GetDbContext[TDbContext](IActiveUnitOfWork unitOfWork, Nullable`1 multiTenancySide, String name)

I expect this is before my filter is scheduled to "wrap" the UOW filter - meaning that the UOW is not available when my filter starts, and the UOW has already been disposed by the time my filter regains control.

How do I get my filter to execute in the correct order?

Thanks,

I just get this error when searching here:

It appears that the Project Name that is chosen during project generation, is utilized throughout localization code, such as XML files for messages. This is not a great choice, as the Project Name is usually an internal moniker, that is development friendly, not exposed to the customer. The product name is something else entirely, based on marketing choices.

The Project Name leaks through to the user interface in localized messages. Can you please implement something to allow us to control what product name appears in the various localization resources?

I.e

Have 2 text inputs in your project generator website, one for the project name (as you do today), which is utilised for the licensing, and another called "Product Name", which is used in the user interface elements, and can be changed at any time without affecting licensing.

Thanks.

Showing 1 to 7 of 7 entries