Asp.net 2.0 webpart experience

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.