Base solution for your next web application

Activities of "Mitch"

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()

I'm trying to get Telerik Reporting working with ASP.Net Zero

Part of the setup is to create an API controller.

I'm following the instructions for getting the Telerik Reporting working on ASP.Net Core ([https://docs.telerik.com/reporting/html5-report-viewer-asp-net-core-2#creating-a-sample-asp-net-core-project]))

However, I'm getting an error.

HTTP500: SERVER ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request. GET - <a class="postlink" href="http://localhost:62114/api/reports/resources/js/telerikReportViewer-12.0.18.227.min.js">http://localhost:62114/api/reports/reso ... 227.min.js</a>

Are there any special considerations when setting up API controllers with ASP.Net Zero that I'm missing?

I already have Telerik Reporting running with an existing MVC app so I have had success in the past. I'm just concerned that there's something that I need to do in my ASP.Net Zero Web.Mvc when using API controllers.

Any ideas?

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.

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 just tried for the last 48 hours to follow the ASP Net Zero Azure guide to get my app working in Azure, but no luck. I'm using the Core project with JQuery. I'm only trying to publish the MVC project, not the Public site.

I have had several existing web apps up and running on Azure for the last 2 years, but my attempts to get ASP Net Zero to work on Azure seem to be getting nowhere. As a last resort I went back to the beginning and used a fresh ASP Net Zero project with no modification except for the database connection strings. I decided to use a connection string that pointed to my existing Azure SQL subscription. Everything works perfectly on my local dev PC, but when I try to run the app after successfully publishing to Azure I get a HTTP ERROR 500 when it tries to redirect to /Account/Login.

I'm struggling to find out what the cause of the 500 error is. I've tried to add Application Insights but that not giving me any feedback regarding the error.

Does anyone have any clues as to what the error could be? Is the app trying to write to location that doesn't exist in the Azure environment? Could it be something to do with HTTPS?

I'm really out of ideas.

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

In the host Administration/Settings I have enabled Email verification and SMS verification. I've also replaced the dummy SMS code with Twilio SMS code.

However, when I log in to test it, I'm only offered Email verification from the dropdown options.

I've ensured the User has a phone number entered into their details. I did read in the instructions that it must be a "Verified" phone number although I'm not sure what a "Verified" phone number is and whether that could be the issue?

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

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

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

Showing 91 to 100 of 103 entries