Base solution for your next web application

Activities of "naeazach"

To clarify, I have multi tenancy set up, and would like visibility in the user list to all users on the system, not just for the host tenant from that login.

thank you as always for the fantastic support.

Upon further inspection I do see that the tenant settings table has these values:

Abp.Net.Mail.DefaultFromAddress Abp.Net.Mail.DefaultFromDisplayName

However, defaultfromdisplayname seems to be ignored.

So is there away I can manually set both those settings?

well i figured it out.

        var city = _geoRepository.Query<Geo>(a => a.Where(aa=> aa.Zip == input.Zip).FirstOrDefault());

cant use getall.

However, I did have my ActionResult annotated with [UnitOfWork]... why didnt that work? How do I ensure that db connection is open when coming into the repo?

So I tried this, but the action inside the service is error that DbContext has already been disposed.

private NAEA.DownPayment.Programs.IGeoAppService _geoService; public HomeController( IRepository<Geo> geoRepository) { _geoService = new GeoAppService(geoRepository); }

    public ActionResult Index()
    {
        _geoService.GetCityFromZip(new GetGeoInput { Zip = "85210" });
        return View();
    }

Thanks, that worked. I didn't know that, like I said, this is a Data First to Code First lack of knowledge. I'm used to altering my table in sql then just refreshing my model =)

Well, it was just that those fields were required.

When I added them and did the migration after setting up the project it automatically set my existing users values to a blank string for all those values so none of them were null for sure (I had checked this after I did the migration because I was curious as to what it was going to do). It seems that the login doesn't bind the user appropriately if there have been new fields added to it perhaps.

It is odd that I'm getting a DbEntityValidationError though I thought because there isn't any sort of insert happening here, it should just be validating the creds, is there something beyond that happening I'm not aware of?

It's compiled into the dll so i really cant see what its doing exactly. This works for me for now, but it may be something you want to consider because the user object is very plain and most apps will have quite a bit of built onto that either directly on the table or adding a profile table.

so i removed the [Required] attributes and it worked again.

This is how I had done it. In User.cs in .Core / Authorization / Users:

    [MaxLength(255)]
    [Required]
    public string Company { get; set; }

    [MaxLength(255)]
    [Required]
    public string Address { get; set; }

    [MaxLength(255)]
    [Required]
    public string City { get; set; }

    [MaxLength(10)]
    [Required]
    public string St { get; set; }

    [MaxLength(10)]
    [Required]
    [DataType(DataType.PostalCode)]
    public string Zip { get; set; }

    [Required]
    [MaxLength(25)]
    [DataType(DataType.PhoneNumber)]
    public string PhonePrimary { get; set; }

So since these are not set I guess somewhere on the login void in the boilerplate dll it causes login to not work. Is there away around this? It'd be preferred to me to have these required.

ok i dug in forums and found MyExceptionHandler and added to my project.

The reason its failing is because some of my required profile elements are showing as null on the model. Why would the login model care about that?

Showing 1 to 9 of 9 entries