Base solution for your next web application

Activities of "mgx92"

Hello community,

I want to replace the web api IHttpControllerSelector service, because I want to use versioning via media types. But when I try it like this:

Configuration.Modules.AbpWebApi().HttpConfiguration.Services.Replace(typeof(IHttpControllerSelector),
                new AcceptHeaderControllerSelector(Configuration.Modules.AbpWebApi().HttpConfiguration,
                accept =>
                {
                    foreach (var parameter in accept.Parameters)
                    {
                        if (parameter.Name.Equals("version", System.StringComparison.InvariantCultureIgnoreCase))
                        {
                            switch (parameter.Value)
                            {
                                case "1.0": return "v1";
                            }
                        }
                    }
                    return "v1";
                }));

The new AcceptHeaderControllerSelector never called. I don't know what's wrong with this solution.. maybe I have to do it via Configuration.ServiceReplace?

I hope someone can help me.

mxg

Good morning community, I have a big problem with abp.

I'm working on my boilerplate solution and want to test my changes... but now i get only this error:

Server Error in '/' Application.

An item with the same key has already been added.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: An item with the same key has already been added.

Source Error:
Line 1:  @{
Line 2:      ViewBag.Title = L("Offer");
Line 3:  }
Line 4:

I changed nothing in the Localization xml files..

What did I do to fix this issue:

  • I rebuiled the solution
  • I checked all Localization xml files for correct syntax
  • I used the spanish one for every xml, because I never change the spanish one
  • I deleted all xml files
  • I clone the git repository again (and tried every point above with the new repository)
  • I used the local IIS and the IIS Express
  • Update abp to version 1.1.3 but the error won't be fixed..

Can someone help me?

PS: in the internet I read to load a new version of abp, but this is an company application and I can not use a new (clean) version - so I have to fix it :) PPS: my colleague doesn't have the problem - and I tried to use his xml files

Thanks, mxg92

Hello Community, I am new at asp.net boilerplate and it's a very nice framework :D

Now I have little problem: I wrote a mvc controller to manage my user data. This works very fine but when I am calling the following method: var user = await _userManager.GetUserByIdAsync(model.UserId);

i get an user object and when I am change a property like this: user.Notification = model.Notification;

it will change the db value without calling a saving method or something else. I want to change this behavior but I don't find any solution for this.

The GetUserByIdAsync method is out of the AbpUserManager-Class so that i cannot see whats happend.

Showing 1 to 3 of 3 entries