Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to find source for SqlProfileProvider.cs file
Message
 
 
To
10/04/2008 15:43:49
General information
Forum:
ASP.NET
Category:
Other
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01309118
Message ID:
01310409
Views:
21
Hi John,

My page tries to get profile information and here is what I see in the stack info:
>	App_SubCode_Providers.w6sws4ti.dll!Microsoft.Samples.SqlTableProfileProvider.GetProfileDataFromTable(System.Configuration.SettingsPropertyCollection properties = {System.Configuration.SettingsPropertyCollection}, System.Configuration.SettingsPropertyValueCollection svc = {System.Configuration.SettingsPropertyValueCollection}, string username = "agreen", System.Data.SqlClient.SqlConnection conn = {System.Data.SqlClient.SqlConnection}) Line 232 + 0x22 bytes	C#
 	App_SubCode_Providers.w6sws4ti.dll!Microsoft.Samples.SqlTableProfileProvider.GetPropertyValues(System.Configuration.SettingsContext context = Count = 2, System.Configuration.SettingsPropertyCollection collection = {System.Configuration.SettingsPropertyCollection}) Line 272 + 0x14 bytes	C#
 	[External Code]	
 	App_Code.8_hs3bpu.dll!ProfileCommon.SiteID.get() Line 30 + 0xd bytes	C#
 	App_Web_qzmcp6zp.dll!AddUsers_Default.GetSiteUsers() Line 179 + 0x29 bytes	C#
 	App_Web_qzmcp6zp.dll!AddUsers_Default.PopRoles() Line 91 + 0x13 bytes	C#
 	App_Web_qzmcp6zp.dll!AddUsers_Default.Page_Load(object sender = {ASP.addusers_default_aspx}, System.EventArgs e = {System.EventArgs}) Line 31 + 0x7 bytes	C#
 	[External Code]	
GetSiteUsers method has the following code:
private MembershipUserCollection GetSiteUsers()
	{
		MembershipUserCollection siteMembers = new MembershipUserCollection();
		MembershipUserCollection Members = Membership.GetAllUsers();
		
		foreach (MembershipUser CurrUser in Members)
		{
			if (Profile.GetProfile(CurrUser.UserName).SiteID == Profile.SiteID &&
				!Roles.IsUserInRole(CurrUser.UserName, "MasterAdmin"))
			{
				siteMembers.Add(CurrUser);
			}
		}
		return siteMembers;
	}
What I don't understand is why private void GetProfileDataFromTable(SettingsPropertyCollection properties, SettingsPropertyValueCollection svc, string username, SqlConnection conn) method tries to update last activity date?

If we're only trying to access the data, why do we need to update the information?

The code comes from MS, as far as I understand, though I was unable to find the original code.

Does anyone have an idea here or where can I ask my question?

Thanks again.



>>>>>One more question - why in the UPDATE statement where is
>>>>>username = lower(@username) ? Why do we use lower is SQL Server is case insensitive ?
>>>
>>>He is setting it to lower all over the palace and storing it as lower, because SQL Server IS case SENESITIVE.
>>>
>>
>>No, it's case insensitive. I just tried
>
>Wow... major whole in my understanding of MSSQL thank you for checking that!!!!!
>
>You may have just saved my a** at some point in the future.
>
>I learn something new every day <g>
>
>Thanks!
>
>It is possible to set the server to be case sensitive, by changing the colation. So maybe that is why he was doing that?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform