Umbraco-cms: Upgrade from 8.0.2 to 8.1.0 results in this error in MyOwinStartup.cs

Created on 11 Jul 2019  路  2Comments  路  Source: umbraco/Umbraco-CMS

Had been using this MyOwinStartup.cs class successfully in 8.0.2: https://our.umbraco.com/documentation/Reference/Security/authenticate-with-AD

Did a NuGet upgrade to 8.1.0, now that class generates this error on build, at the line "var userManager = BackOfficeUserManager.Create(, I get the following error:

Severity Code Description Project File Line Suppression State
Error CS7036 There is no argument given that corresponds to the required formal parameter 'globalSettings' of 'BackOfficeUserManager.Create(IdentityFactoryOptions, IUserService, IMemberTypeService, IEntityService, IExternalLoginService, MembershipProviderBase, UmbracoMapper, IContentSection, IGlobalSettings)'

Most helpful comment

Note: It appears the BackOfficeUserManager property count increased by one to include an Umbraco.Core.Mapping.UmbracoMapper property after the membershipProvider property. Altered our previous code from that article to include Mapper property, which does allow the Build to complete, but not sure if that's the right code change to make:

var userManager = BackOfficeUserManager.Create(
   options,
   Services.UserService,
   Services.MemberTypeService,
   Services.EntityService,
   Services.ExternalLoginService,
   membershipProvider,
   Mapper, // Added this line after upgrade from 8.0.2 to 8.1.0
   UmbracoSettings.Content,
   GlobalSettings
);

All 2 comments

Note: It appears the BackOfficeUserManager property count increased by one to include an Umbraco.Core.Mapping.UmbracoMapper property after the membershipProvider property. Altered our previous code from that article to include Mapper property, which does allow the Build to complete, but not sure if that's the right code change to make:

var userManager = BackOfficeUserManager.Create(
   options,
   Services.UserService,
   Services.MemberTypeService,
   Services.EntityService,
   Services.ExternalLoginService,
   membershipProvider,
   Mapper, // Added this line after upgrade from 8.0.2 to 8.1.0
   UmbracoSettings.Content,
   GlobalSettings
);

Looks about right to me :-)

Was this page helpful?
0 / 5 - 0 ratings