I have learned how to use webpart over the past few days and found many problems. I will share the following with you:
1. The use of webpart must be based on an authenticated user session.
2. The webpart personalization option applied to all users is disabled by default. You can modify web. config to complete this.
<Webparts>
<Personalization>
<Authorization>
<Allow users = "*" verbs = "entersharedscope"/>
</Authorization>
</Personalization>
</Webparts>
3. By default, webpart uses the URL of the page to store personalized data. but it does not contain querystrings. Now we need to implement a general page (Template) to implement a simple portal system, and read personal and Department data through different querystrings. In this way, personal settings can be shared directly with others. This requirement cannot be implemented on the existing webpart system, in the webpart components for Asp.net 2.0: Workspace home URL: http://www.gotdotnet.com/workspaces/workspace.aspx? Id = 65fa26c3-a62a-49d6-895d-422272e53a0c has a webpart system that can meet the requirements. The author of this webpart: http://fredrik.nsquared2.com/viewpost.aspx? Postid = 326
4. Enable the webpart export function: Modify the webpart settings in Web. config.
<Webparts enableexport = "true">
5. An error occurred while importing the custom webpart: cannot add a control of Type dotnetclubportal. webcontrols. webparts. rssreader. The type must be loadable by buildmanager. GetType (string typename ).
Solution: Modify the Web. config file:
<Runtime>
<Assemblybinding xmlns = "urn: Schemas-Microsoft-com: ASM. V1">
<Probing privatepath = "bin"/>
</Assemblybinding>
</Runtime>
Http://msdn2.microsoft.com/en-us/library/e0s9t4ck (En-US, vs.80). aspx
1. enable Anonymous Authentication.
<Anonymousidentification enabled = "true"/>
3. nsquared's blog is indeed good.ArticleA lot.