I need to list all profiles of specific user but I cannot find how to do this.
public abstract ProfileInfoCollection FindProfilesByUserName(
ProfileAuthenticationOption authenticationOption,
string usernameToMatch
)
Returns me huge number of unwanted things here example:
"UserName": "Alex",
"IsAnonymous": false,
"IsDirty": false,
"LastActivityDate": "2013-08-16T00:44:30.98+03:00",
"LastUpdatedDate": "2013-08-16T00:25:15.663+03:00",
"Properties": [
{
"Name": "Name.First",
"IsReadOnly": false,
"DefaultValue": "",
"PropertyType": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
"SerializeAs": 0,
"Provider": {
"ApplicationName": "/",
"Name": "AspNetSqlProfileProvider",
"Description": "SQL profile provider."
},
"Attributes": {
"AllowAnonymous": false
},
"ThrowOnErrorDeserializing": false,
"ThrowOnErrorSerializing": true
}
]
Is there any way to list only the used / listed in web.config profiles?
Update: I also tried to write my one provider extension but I cant find where ProfileBase saving the profiles / profile groups.
Thanks!
After long time of search I found only one way to solve the problem.
I wrote simple function for example:
And the usage: