The WebSecurity.CreateUserAndAccount method checks for an input on the propertyValues parameter and converts it to a RouteValueDictionary before it is passed on to the ExtendedMembershipProvider.
When constructing a RouteValueDictionary using an object (typeof object), the result is unexpected ... item/indexing is lost. In this case, the new keys are "keys" and "values".
Casting the input to an IDictionary<string, object> fixes the issue.
Current:
```
IDictionary<string, object> values = null;
if (propertyValues != null)
{
values = new RouteValueDictionary(propertyValues);
}
```
Suggested:
```
values = new RouteValueDictionary((IDictionary<string, object>)propertyValues);
```
I'm not clear on why the propertyValues parameter is an object type and not IDictionary<string, object>. Either the type should be changed or type assignment checking should be performed.
Comments: verified.
When constructing a RouteValueDictionary using an object (typeof object), the result is unexpected ... item/indexing is lost. In this case, the new keys are "keys" and "values".
Casting the input to an IDictionary<string, object> fixes the issue.
Current:
```
IDictionary<string, object> values = null;
if (propertyValues != null)
{
values = new RouteValueDictionary(propertyValues);
}
```
Suggested:
```
values = new RouteValueDictionary((IDictionary<string, object>)propertyValues);
```
I'm not clear on why the propertyValues parameter is an object type and not IDictionary<string, object>. Either the type should be changed or type assignment checking should be performed.
Comments: verified.