November Happy Hour will be moved to Thursday December 5th.

Error for Username as "The parameter 'username' must not contain commas."

Vote:
 

Hi,

I am using EPiServer CMS 10.3.1 hosted on Azure Cloud. We have used IAM for authentication and autharization and then getting claim.

I am getting error "The parameter 'username' must not contain commas." for user while logging in.

[ArgumentException: The parameter 'username' must not contain commas.
Parameter name: username]
   System.Web.Providers.DefaultMembershipProvider.GetUser(String username, Boolean userIsOnline) +184
   EPiServer.Security.MultiplexingMembershipProvider.FindMembershipUser(String username) +118
   EPiServer.Security.MultiplexingMembershipProvider.get_CurrentMembershipUser() +34
   EPiServer.Security.MultiplexingMembershipProvider.get_CurrentProvider() +31
   EPiServer.Security.MultiplexingRoleProvider.get_CurrentProvider() +61
   EPiServer.Security.MultiplexingRoleProvider.GetRolesForUser(String username) +26
   System.Web.Security.RolePrincipal.GetRoles() +215
   System.Web.Security.d__4.MoveNext() +58
   System.Security.Claims.d__51.MoveNext() +253
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +190
   System.Linq.d__63`1.MoveNext() +60
   System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other) +140
   System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer) +125
   EPiServer.Security.Internal.VirtualRoleToClaimConverter.AddClaims(IPrincipal principal) +597
   EPiServer.Security.Internal.VirtualRoleEventHandler.AddClaims_PostAuthenticateRequest(Object sender, EventArgs e) +57
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

As users are stored from different system, how can I allow "," or "-" in the username, or is it not possible in Membership provider.

Please let me know if anyone knows solution, that will be a great help.

Thanks,
Sanket Mahimkar
#176585
Mar 22, 2017 13:55
Vote:
 

Can you use the user's email address instead for authenticating?

#176740
Mar 24, 2017 11:01
Vote:
 

Hi,

I am not using it for authentication. I am using Identity access Management for User authentication. In my config file, there is

MultiplexingMembershipProvider is used. I guess, this is creating an issue. But what if I want to use Username for authetication, is that a problem.

Thanks & Regards,

Sanket Mahimkar

#176753
Mar 24, 2017 15:34
Vote:
 

Possibly depending on the provider.  By default the Multiplexing provider uses Windows and Sql membership.  

You could not use the older membership providers and go with AspNet Identity instead.  This uses OWIN which you can configure to work with IAM.

http://world.episerver.com/documentation/developer-guides/CMS/security/episerver-aspnetidentity/

#176756
Mar 24, 2017 17:04
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.