Base solution for your next web application

Activities of "david"

Hi hikalkan,

Thanks for your response. As abp cache is extending memory cache, it could be nice if we can use the methods provides. I agree that is not best practice to storing disposable items in cache, however this is a gray zone :D it is a costly initialization and wanted to test whether cache or singleton performs better in long term running. In addition to the previous question, ive also tried redis cache. I noticed that if i try to clear all caches in initialize method(as redis is still running after application restart and previous cached items persist) i get an exception. I didnt had the time to test whether the exception is thrown while trying to clear the container of holding disposable objects or not. Maybe tomorrow.

Thanks hikalkan for your suggestion, However i cannot use cookie to determine this info. The reason is that im having two types of users. App users and normal users. Normal users have the UI to create App users. The only difference between them is an enum that defines a user as App user. App users have different set of permissions. No problem on that. Using cookie approach will work in production but will fail in swagger tests because the app user it is used with swagger bearer authentication should probably accessed the ui and generated the cookie on same domain as the swagger(might be wrong here)

The solution im using now is an app service that determines usertype enum by user id by using usermanager. However i was looking if there was some more elegant and faster already in claims, or maybe provide me some more info regarding your second proposed solution as i haven't got it.

Thanks again and keep great work.

This is what i do in my web module, you can do the same in your Application module:

public static class AutoMapperWebConfiguration { public static void Configure() { ConfigureAdministrationMapping();

    }

    private static void ConfigureAdministrationMapping()
    {
        var input = Mapper.CreateMap<ServerViewModel, ServerInput>();
        var AppUserToUserMap = Mapper.CreateMap<UserListDto, AppUserViewModel>()
            .ForMember(dest => dest.AppID,
                       opts => opts.MapFrom(src => src.UserName));
    }

}

and in initialize method of the module, i call AutoMapperWebConfiguration.Configure();

It works for me, i don't know if there is a more elegant way of achieving it

Answer

I was having error too while testing db per tenant. What solved me the issue on my dev machine, was to enable TCP/IP connections to the sql express server: <a class="postlink" href="http://blog.citrix24.com/configure-sql-express-to-accept-remote-connections/">http://blog.citrix24.com/configure-sql- ... nnections/</a>

Your connection string looks ok

You may ignore the firewall part oft he tutorial if you you are working locally.

Answer

That is what i was thinking of at the beginning. Just wondering if there was already something automated and missed it i.e like the way the fw is holding the tenancy permissions and settings.

Thanks for the confirmation Hikalkan

Hi,

It is fairly easy with azure web app service. You have to create a web app service with a database linked. Then you download publish profile, insert into visual studio and publish. To perform the migrations to azure db you can change the connection string in web config temporarily, or target it during update-database command(Update-Database -ConnectionStringName "AzureConnectionString").

Dont forget to white list your ip in order to perform migrations.

Showing 1 to 6 of 6 entries