Three deployment methods for WebPart

xiaoxiao2021-04-04  240

Three ways to deploy web parts:

1. Manual deployment

2. CAB file deployment

3. MSI file deployment

First introduce the manual deployment method, you can "develop a simple WebPart" according to my other article, first make a WebPart, follow these steps:

(1) Copy the DLL file of our compiled WebPart project to the bin folder in the website virtual directory, or can also put it in Global Assembly Cache (C: / Windows / Assembly) - Need not to use this

(2) Copy the DWP file in the project folder to the WPCATALOG folder in the website virtual directory

(3) Copy the resource file. If you use GAC (GLOBAL Assembly Cache) When you place a web part, copy the resource file to C: / Program Files / Common Files / Microsoft Shared / Web Server Extensions / WpResources. If you use BIN to place a web part, copy the resource file to the WPResources folder in the website virtual directory.

(4) Finally, it is also a more important step, that is, modify the configuration file.

These include the level of trust in the website

Modify Level to Full

Increase our own control for SafeControl

After these four steps we can find our custom web part when you add WebPart to the Website.

CAB file deployment:

We add a CAB project on the development of WebPart solutions

The CAB file should contain

1. AskEMBLY DLL

2. DWP file

3. Manifest.xml

4. resource

Then generate a CAB file, there are two ways, generated with VS.NET or using makecab.exe.

Install Web Parts Stsadm.ex from CAB File

Stsadm -o Addwppack -FileName C: /TestWebPartcab/debug/testwebpartcab.cab

MSI file deployment

Using the MSI file deployment, it contains all the features of all CAB file deployments, and supports CAS (Code Access Security) and can be uninstalled by the control panel.

Can use this tool WPPACKAGER.EXE

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

New Post(0)