PRACTICAL PERSONALIZATION TIPS
The following list provides some personalization tips:
‰ Don’t try to access the profile of the current user in the Login page, because it isn’t available yet. The profile is instantiated early in the page’s life cycle, so when a Login control authenticates a user in a Login page, it’s too late to associate that user’s profile with the current request. Use the GetProfile method of ProfileCommon instead or redirect to another page.
‰ Carefully consider what to store in Profile and what is better stored in your own database tables. Although the single-row structure that ASP.NET uses to store your profile offers you a simple and convenient solution, it’s not the most efficient one, especially not with large amounts of data. Don’t try to store complete reviews or even photo albums in Profile, but use your own database tables instead.
‰ The current implementation of Profile makes it difficult to query data from the Profiles table in your own queries. For example, it’s difficult to answer queries like “Give me all users that prefer the Rock genre” because all the data is stored in a single column. To work around these issues, store data in your own tables (using Entity Framework, for example), or use a different Profile provider that you can download from the Sandbox section of the official ASP.NET website at www.asp.net/downloads/sandbox/.
PRACTICAL PERSONALIZATION TIPSThe following list provides some personalization tips:‰ Don’t try to access the profile of the current user in the Login page, because it isn’t available yet. The profile is instantiated early in the page’s life cycle, so when a Login control authenticates a user in a Login page, it’s too late to associate that user’s profile with the current request. Use the GetProfile method of ProfileCommon instead or redirect to another page.‰ Carefully consider what to store in Profile and what is better stored in your own database tables. Although the single-row structure that ASP.NET uses to store your profile offers you a simple and convenient solution, it’s not the most efficient one, especially not with large amounts of data. Don’t try to store complete reviews or even photo albums in Profile, but use your own database tables instead.‰ The current implementation of Profile makes it difficult to query data from the Profiles table in your own queries. For example, it’s difficult to answer queries like “Give me all users that prefer the Rock genre” because all the data is stored in a single column. To work around these issues, store data in your own tables (using Entity Framework, for example), or use a different Profile provider that you can download from the Sandbox section of the official ASP.NET website at www.asp.net/downloads/sandbox/.
การแปล กรุณารอสักครู่..
