Base solution for your next web application

Activities of "Mitch"

Hi

I'm using Azure too so I think I'm going to hit the same problems. Can you tell me how you setup SendGrid to work with ASP.Net Zero?

I really appreciate your help in advance.

Mitch

Hi

I've been using Azure for many years.

Probably your best bet is to start with a free account and work up from there. It's really easy to move between different plans so just start with an inexpensive option and just increase performance (and cost!) as you need it.

Mitch

Thanks for your replies. I have used SendGrid in a previous project so I do have some experience with it. My issue was where is the best place to put the code within ASP. Net Zero?

Hi

Yep that fixed it, many thanks!

Surely it's an oversight though in the MVC version. Without verifying your phone number the SMS doesn't work and there's no button to click on to Verify.

Mitch

Hi Aaron,

It can be a bit tricky reading logs in Azure Web Apps. I decided to log into Azure, go to my App Service and in Settings => Application Settings I added a new settings to the Application Settings section. (which was ASPNETCORE_ENVIRONMENT in the first column followed by "Development" in the second column. This allows my Web App to report a detailed error message.

The detailed error is "DirectoryNotFoundException: Could not find a part of the path 'D:\home\site\wwwroot\Plugins'."

I'm using a new version of ASP Net Zero with jQuery release 5.3.0 (.Net Framework not Core) with only the connection strings changed. It works fine on my development PC.

Why on earth is it looking for 'D:\home\site\wwwroot\Plugins'. !?

I've actually got things working in Azure!

In Startup.cs I commented out the following line

options.PlugInSources.AddFolder(Path.Combine(_hostingEnvironment.ContentRootPath, "Plugins"));

Now ASP.Net Zero will run and allow me to log in. Not sure if the commented out line will cause me issues later though.

Thanks for getting back so quick Aaron.

Could it be to do with the Logger? I'm just a bit confused as this is the first time I've tried using an API Controller with ASP.Net Zero.

ERROR 2018-04-09 18:42:52,958 [11 ] Mvc.ExceptionHandling.AbpExceptionFilter - No component for supporting the service DpmsCloud.Web.Controllers.ReportsController was found Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service DpmsCloud.Web.Controllers.ReportsController was found at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments) at Castle.Windsor.WindsorContainer.Resolve(Type service) at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.ResolveInstanceOrNull(Type serviceType, Boolean isOptional) at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional) at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetRequiredService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__23.MoveNext()

Many thanks for the advise Aaron, it worked! However there now seems to be further issues as the api URL's don't seem to be working and apparently this is caused by the api routing not working.

To be honest this is becoming a pain and I'm considering using a different reporting system with ASP Net Zero.

Thanks again for your help last week.

Hi

Did you get an answer to this problem from Stimulsoft?

I'm about to start using Stimulsoft reports with ASP Net Zero and I'm probably going to hit the same issue.

Many thanks

Just to confirm, I'm getting the same problem. Here's my logs.

INFO 2018-04-19 23:14:46,717 [13 ] idateAntiforgeryTokenAuthorizationFilter - Antiforgery token validation failed. The required antiforgery request token was not provided in either form field "__RequestVerificationToken" or header value "X-XSRF-TOKEN". Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery request token was not provided in either form field "__RequestVerificationToken" or header value "X-XSRF-TOKEN". at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.<ValidateRequestAsync>d__9.MoveNext() --- End of stack trace from previous location where exception was thrown ---

Showing 1 to 10 of 62 entries