Deploying WebPart I realized some truth

xiaoxiao2021-03-06  65

In fact, WebPart is a web control program, so I probably know how to deploy .NetWeb control from here.

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

Then, you can publish this control entity file to the .NET environment, generally there are two places, one is a global GAC, which is the assecmbly directory in the system directory, and another place is the Bin directory of the main directory of the web site. .

The third step is to register this control. We need to edit the web.config file in the Web site directory, register this part as security components.

The fourth step is to give a certain permissions. If it is put it under the GAC, this web part has full control permissions. If we are placed in the bin directory of the primary directory, we need to change the execution permission of Web.Config.

Unlike ordinary web controls, WebPart has more .dwp files, this file is essentially an XML file, when you deploy WebPart, you can put him into bin, or import this file through the SPS management interface.

If, I will pack (for webpart) through the CAB project, and pay attention to another XML file main * .xml, make sure that the file name referenced in this file is consistent with your file name.

In addition, when doing WebPart, you must clear the name of WebPart, because the system will call your webpart by default, there will be no problem when compiling, but when you deploy, you will find one Question, there will be a lot of things called WebPart, in the end, you have to rename the.dwp file of WebPart you want to introduce

转载请注明原文地址:https://www.9cbs.com/read-111077.html

New Post(0)