Deploying WebPart I realized some truth.

Source: Internet
Author: User
The web actually WebPart is a Web control program, so from here I probably know how to deploy the. Netweb control.

First, the development of WebPart or Web controls must have a strong name, which requires the addition of a version number and a key file each time you compile.

You can then publish the control's entity files to a. NET environment, typically in two places, one in the global GAC, the assecmbly directory in the system directory, and the other in the bin directory of the Web site's home directory.

The third step is to register the control. We need to edit the Web.config file in the Web site directory and register this part as a safe part

The fourth step is to give certain permissions. If it is in the GAC, the Web Part has full control, and if placed in the bin directory of the home directory, we need to change the execution permissions of the web.config

Unlike ordinary Web controls, WebPart has a more than one. dwp file, which is essentially an XML file that can be put together under bin when a WebPart is deployed, or it can be imported through the SPS Admin interface.

If I package with a Cab project (for WebPart), and notice another XML file Main*.xml, make sure that the file name you refer to is the same as your file name.

In addition, when you are doing WebPart, be sure to think about the name of WebPart, because the system by default will call your WebPart Webpart1, compile without any problems, but, when you deploy, you will find a problem, There are a lot of things called WebPart, and finally, you have to rename the. dwp file of the WebPart you want to introduce each time.





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.