Base solution for your next web application

Activities of "jcompagnon"

Hello,

First off, I'd like to say, great job on the framework. I've learned a lot from playing around with ABP in the past year, and the polish on ABPZero is terrific. Being a newer dev, and coming from the limitations of developing extensions tailored to a particular CMS, I had (and have) a lot to learn about robust design, and ABPZero/Boilerplate and these forums have really helped me to understand the SOLID principles and currently available tools.

On that note, I'm looking for advice on how I could approach a design problem I'm running into, and any direction to how I might approach it, or where I should look to find more info.

The company for which I work is looking to rebuild our "Core"/starter template, this time based on ABPZero. Our main source of projects is creating web apps for research "Studies" for researchers within our company, which are generally non-permanent, and all hosted on our facility's servers. These Studies typically have a lot in common, but each one has customizations related to the type of study, and particular research being done (such as unique forms, different relationships of users to the workflows, etc). Because we frequently have several projects live at any given time (currently, ~20), we want to be able to easily push updates from our Core, when we make updates to make use of newer ABP versions, or bug fixes to the common Core.

A solution I was hoping to try was to have one central repo for the Core, being the ABPZero template & our standard tools (using the ABP Update suggestion posted on github <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/96#issuecomment-268093697">https://github.com/aspnetzero/aspnet-ze ... -268093697</a> ), package each core template project (Mvc, App, EF, etc) as a separate nupkg (on a private nuget feed!), and creating small modules per-Study that would load up the entire application, adding whatever customization a particular Study requires.

Currently, that means I'm embedding the resources & views of the MVC project, and loading the entire MVC app into my smaller web module. However, I'm not sure if this approach is 'best-practice', or even 'okay-practice', and was wondering if instead I should be basing new Studies on the MVC project, and handling updates made to the MVC Core manually for each project. This could be quite time-consuming across the projects we have, though, so I worry about the maintenance required.

Has anyone run into this issue and have some advice or warnings about approaching it this way, or suggestions as to how it could be approached differently? I know it's a bit out-of-scope for support, but any advice would be greatly appreciated!

Thanks!

Hello,

I am trying to run a .Mobile solution following this part of the documentation <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Xamarin#solution-structure-layers">https://aspnetzero.com/Documents/Develo ... ure-layers</a>.

I have set up the environment by setting the proper local IP to LocalhostIp in DebugServerIpAdresses.cs, downloaded the Xamarin Android SDK Manager and API up to 26 installed.

When debugging with the emulator Android_Accelerated_x86_Nougat (Android 7.1 - API 25), it brings up the emulator and runs the application correctly. I am able to sign in.

I've also hooked up my Android device via USB (Samsung Galaxy S7 - listed as Android 7.0 - API 24) and enabled USB debugging via Developer options. However, when I run the application again, it opens the splash screen on my phone but never moves from there, eventually getting an error saying "cannot connect to server".

I've confirmed that the AndroidManifest has INTERNET enabled as a Required permission.

Is there a setting I missed or some other add-on I need to download to make it work? Is it something to do with the solution or my Samsung device's settings?

Documentation I've already looked at: <a class="postlink" href="https://developer.xamarin.com/guides/android/getting_started/installation/windows/">https://developer.xamarin.com/guides/an ... n/windows/</a> <a class="postlink" href="https://developer.xamarin.com/guides/android/getting_started/installation/set_up_device_for_development/">https://developer.xamarin.com/guides/an ... velopment/</a> <a class="postlink" href="https://developer.xamarin.com/guides/android/troubleshooting/questions/android-internet/">https://developer.xamarin.com/guides/an ... -internet/</a>

Thanks!

Jonathan

Hello!

I'm running into some issues trying to get an MVC/Jquery Core 2.0 project running under a default local IIS site, as all content requests are looking at the IIS base site (localhost:80/) instead of the virtual app underneath (localhost/MyApp/).

Is there a suggested way to update the links for "view-resources", etc, without updating all href/src tags in the app?

Hello,

I'm wondering, if it's possible in the first place, how I would go about querying the database (using EF) using an ID and a table name.

For example:

QueryDynamicData(string tableName, long entityID){
return GetItem(tableName, entityID);
}

And could be called like:

var entry = QueryDynamicData("Person", 143);

Thanks in advance!

Hello,

Using ABP.Hangfire 2.1.3, I'm trying to create a recurring job to send a daily email. Following many of the suggestions from #2645, I have the following:

public override void PreInitialize()
        {
Configuration.BackgroundJobs.UseHangfire(configuration => configuration.GlobalConfiguration.UseSqlServerStorage("Default"));
            GlobalConfiguration.Configuration.UseActivator(new WindsorHangFireJobActivator());
}
public override void PostInitialize()
        {
            IDailyEmailTaskAppService dailyEmailTaskAppService = IocManager.Resolve<IDailyEmailTaskAppService>();
            RecurringJob.AddOrUpdate(() => dailyEmailTaskAppService.SendDailyEmail(), Cron.Daily);}
class DailyEmailTaskAppService : FirstASPNetZeroAppServiceBase, IDailyEmailTaskAppService
    {
        private readonly IEmailSender _emailSender;
        private readonly IOrganizationUnitAppService _organizationAppService;

        public DailyEmailTaskAppService(IEmailSender emailSender, IOrganizationUnitAppService organizationAppService)
        {
            _emailSender = emailSender;
            _organizationAppService = organizationAppService;
        }
        
[UnitOfWork]
        public virtual void SendDailyEmail()
        {
            using(CurrentUnitOfWork.DisableFilter(AbpDataFilters.MayHaveTenant))
            {
                _emailSender.SendAsync("[email protected]", "Test Email Subject", "Test Email Body", false);
            }
        }
    }

Unfortunately, I'm still getting the same error as the last from the linked post, namely

Could not load file or assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

.

Note that I'm very new to boilerplate so not everything done may be best way of doing things.

Thanks in advance!

Hello,

I've recently begun trying out the module system to allow for independent features to be developed separately, but I'm having a problem when it comes to including .cshtml files in custom modules.

In particular, while I'm able to hit my module's controller, the site is unable to find the appropriate Index.cshtml file. I tried embedding the .cshtml files as described in <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Embedded-Resource-Files">https://aspnetboilerplate.com/Pages/Doc ... urce-Files</a> , but when I navigate to the module's page I get a Page 404 as the result.

The steps I took to register the views were: 1 - Mark all files in my module's /Views/ folder to be embedded resources 2 - Added an Embedded Resource set in my module's PreInitialize method

Again, this custom module's controller receives the request as expected. Is there something else I need to do to reach embedded view files of different modules?

Hello,

I'm currently running into a problem where attempting to change a user's culture from the language dropdown list is failing.

I can see that the call to the AbpLocalizationController's 'ChangeCulture' is going through, but the request reloads the dashboard page in the same language, rather than updating to the new selection.

This issue only appeared after a Clean & Rebuild operation - prior to this, it worked, so I'm not sure why the this would be behaving any differently.

I believe the issue is coming from the setting of the Abp.Localization.CultureName cookie - When inspecting the cookies in Chrome, I can see that the a cookie for the new language is added; however, the previous cookie still exists, and has a "Path" set to the application directory - causing the old language to still be used as the culture. I've tried clearing my cache, removing the cookies, and

I'm not sure how to correct this - from my project, the only reference I see to adding this cookie is done in the web project's Global.asax "RestoreUserLanguage" method:

private void RestoreUserLanguage()
        {
            var settingManager = AbpBootstrapper.IocManager.Resolve<ISettingManager>();
            var defaultLanguage = settingManager.GetSettingValue(LocalizationSettingNames.DefaultLanguage);

            if (defaultLanguage.IsNullOrEmpty())
            {
                return;
            }

            try
            {
                CultureInfo.GetCultureInfo(defaultLanguage);
                Response.Cookies.Add(new HttpCookie("Abp.Localization.CultureName", defaultLanguage) { Expires = Clock.Now.AddYears(2)});
            }
            catch (CultureNotFoundException exception)
            {
                LogHelper.Logger.Warn(exception.Message, exception);
            }
        }

I've registered the languages to be used in the EntityFramework's DefaultLanguagesCreator() method, and re-ran update-database in that project to ensure the DB was seeded appropriately.

Is there something I'm missing to allow for swapping languages? Thanks in advance for any help/advice!

Hello, nice job on the framework!

I was wondering if there were suggested best practices /avenues for localizing list data (as might be used in setting dropdowns, related radio groups, or "levels of satisfaction" scales).

I understood from this thread that creating a service to receive a language code & return the list is one option; my question is, what would this look like in the XML scheme?

If possible, I'd like to not have to register each list as a separate Localization Source in the AbpModule, instead being able to specify a source that would include all localizations for all lists, labels, and error resources.

I'd appreciate any tips, leads or re-orientations!

Showing 1 to 8 of 8 entries