Base solution for your next web application

Activities of "piapps"

Hi guys,

So I am in the process of trying to create a UWP project in the mobile solution, everything compiles when it runs I am getting a null exception at line 56 of LoginViewModel in Mobile.Shared\ViewModels\LoginViewModel

It appears everything under applicationContext is null (applicationContext.Configuration etc), i have a feeling that maybe the DI is not working correctly or something like that but I am having trouble trying to see exactly what is wrong

My UWP is just a blank UWP that I have added a Locale.cs to (to match the other mobile projects), then added references to Application.Client Application.Shared Core.Shared Mobile.Shared

It wouldnt compile without all 4 even though only 2 are needed, also has Flurl and Flurl.Http, Xamarin.Forms (same versions as the other projects) The MainPage.xaml.cs has this.LoadApplication(new App()); added to the ctor and inheritance to Page removed from the class while WindowsPage was added to the xaml markup App.xaml.cs has had the following added to the OnLaunched event

ApplicationBootstrapper.InitializeIfNeeds<NAMESPACEXamarinUWPModule>();

AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException;

base.OnLaunched(e); //Xamarin.Forms.Forms.Init(e); global::Xamarin.Forms.Forms.Init(e);

ImageCircleRenderer.Init(); CachedImageRenderer.Init();

ConfigureFlurlHttp();

and the App.xaml.cs inherits from Windows.UI.Xaml.Application

So I think either the App.xaml is inherting maybe from the wrong thing or OnLaunched might be wrong event perhaps or I need more references in the project to fix up the applicationContext null thing but im not really sure can anyone help?

Regards, Pete

Hi guys,

We have ASPNet Zero solution running in two Azure App Services spread over 2 geographic locations and it works well, however both instances are running the same background jobs im guessing because the job query transaction is not blocking reading of the same rows.

So my question is can I simply implement my own background job store to lock the reading of rows (in effect making it only one instance can read any single job at a time) and fix the issue. Or is it more systemic than that and I would need to adjust other layers of the background job code?

I do want the ability for multiple instances to process jobs just not the same jobs, our project will probably end up scaling up to 3-6 instances over the coming months with one of the purposes to utilise the job system accross all of them

Thanks in advance

Hi guys,

I have added an appsettings.Development.json file to my Web.Host project for use on my local machine which works fine.

However the EntityFrameworkCore project must not use the file because whenever I do Update-Database it fails (unable to find sql instance) unless I put the correct conn string back into appsettings.json.

How or where can I adjust the connection string resolver so that .Development will be respected by migrations?

Im using v6.8.0

Regards, Pete

Hi guys,

We have an extension to one of our Zero projects that might benefit from using the MVC site however we mainly run the angular version.

If I generate a MVC/jquery project can I just grab the MVC project from inside that, import it into the larger angular/web api project and update dependancy locations and the MVC site should just function?

Alternatively is there any way to do this? We still havent decided if this is the way we want to go just yet but I am interested in knowing if its possible

Obviously there is already the public site in the angular project however it doesnt really integrate with any of the services by default hence the question

Thanks

Question

Hi guys,

Just wondering with an enterprise license if we use one of the slots for a clients project and then at some point later in the future if they want to break relations can they take ownership of the license as long as they only assign whatever free developer slots that are left to that new license?

Or would it be better that at that point they purchase their own license then create a project with same name and basically get 'granted' the rights to the project?

Regards, Pete

Hi guys,

Just wondering if anyone else using the Angular Zero project v4.5.1 is getting an error when compiling it for production?

From a blank project (fresh download from aspnetzero.com) if i go straight to angular folder and run ng build --prod

I get an error in /node_modules/primeng/components/dropdown/dropdown.d.ts.Dropdown.html (6,13) Type string is not assignable to type boolean

Not sure if anyone else has experienced this but I have managed to fix it but had to do several things which may be useful for others

  • Open package.json in the angular project and change the version of primeng from ^4.2.0-rc.1 to ^4.2.0
  • Run yarn so it updates primeng (confirm it updated 'npm list primeng')
  • Recompile for production and you will be hit with more errors this time it will be something about expecting 1 argument but getting 2 in several of zeros ts files. They all have null as second argument so you can just delete the problematic argument.
  • Recompile and it should work, however upon visiting the site you will be hit with a wierd error in js console 'Error: Cannot enable prod mode after platform setup.'
  • Open package.json and change the version of ngx-bootstrap from ^1.9.1 to ^1.9.2
  • Run yarn and confirm its updated
  • Recompile and voila

DISCLAIMER: I have no idea if updating those two angular modules has any other side effects. I have tested various parts of Zero afterwards but not thoroughly.

Showing 1 to 6 of 6 entries