Note:
The premise is that the code writing has been completed;
1. Direct copy method:
1. Configure WebPart
Modify the. dwp file (in XML format)
1.2 trust WebPart
Editing the web. config file under the root directory of the VM hosting the SPS site
1.3 deploy WebPart
Copy the. dll assembly files and other associated files generated by the webpart project to the "bin" directory under the root directory of the VM hosting the SPS site;
1.4 import WebPart
Upload the. dwp file.
For more information about the above steps, see Step 1 webpart-how to use. net to create the first webpart? (3)
2. Deploy the WebPart to the SPS server in the (. CAB) mode.
2.0 download Cabinet Manager 2003 simplified http://ftp20.enet.com.cn: 88/pub/fmanager/fcompress/HA_cab2003b_wjk.zip
2. 1. Configure WebPart
Modify the. dwp file (in XML format)
2.2 generate the. CAB file
Generate
. Dll Assembly File
. Dwp file (WebPart description file)
Manifest. xml file (WebPart deployment file)
And other associated files
Copy to a folder, right-click all and choose => "add to Cabinet". The Cabinet Manager is displayed ,:
Save. We recommend that you use the Assembly name for saving ,:
Tip: My cab file is under the root of drive D.
2.3 deploy WebPart
Whether the specified stsadm.exe file is under "C: \ Program Files \ Common Files \ Microsoft Shared \ web server extensions \ 60 \ BIN". If it is in this directory, set "C: \ Program Files \ Common Files \ Microsoft Shared \ web server extensions \ 60 \ BIN "added to the system path:
"My Computer" => "property" => "advanced" => "environment variable" =>
Find "path" => "edit", add a plus sign at the end ";" then add "C: \ Program Files \ Common Files \ Microsoft Shared \ web server extensions \ 60 \ BIN. OK! :
In "run", enter "CMD" to display cmd.exe.
Enter the following statement: stsadm-o addwppack-filename webpart2.cab ,:
3. Deploy the WebPart on the SPS server in (. MSI) Mode
3.0 download WebPart Packager
Http://download.microsoft.com/download/4/3/f/43f63003-1d83-45ac-bb4f-3da9fa6ae487/WPPackagerSetup.exe
3.1 decompress the package to d: \ WPPackager (seven files in total) and copy Manifest. xml, WebPart1.dwp, and WebPart2.dll to this directory.
3.2 edit the wppackager. xml configuration file as follows:
<? Xml version = "1.0"?>
<Wppackager xmlns = "http://schemas.microsoft.com/WebPart/v1/Wppackager">
<! --
The manifest node for specifying the manifest file. The manifest file has to be
Present relative to the folder from which the tool is run.
-->
<! -- Edit 1: FileName = deployment file name of webpart -->
<Manifest FileName = "Manifest. xml"/>
<! --
The CodeAccessSecurity node contains the permission set to be applied to
Assembly specified in the AssemblyName attribute.
-->
<! -- Edit the Assembly name of 2 AssemblyName = webpart: -->
<CodeAccessSecurity AssemblyName = "WebPart2" Version = "1.0.0.1" PublicKeyBlob = "xxxxxxx">
<! --
Note that these are the minimal permissions needed to run a web part plus the SharePoint
Permission. More information about permissions that you can request for your web part
Can be found:
Http://msdn.microsoft.com/library/default.asp? Url =/library/en-us/cpguide/html/cpconcodeaccesspermissions. asp
And
Http://msdn.microsoft.com/library/default.asp? Url =/library/en-us/dnspts/html/sharePoint_WSSCodeAccessSecurity.asp
-->
<PermissionSet class = "NamedPermissionSet" version = "1">
<IPermission
Class = "System. Web. AspNetHostingPermission, System, Version = 1.0.5000.0, Culture = neutral, PublicKeyToken = b77a5c561934e089"
Version = "1"
Level = "Minimal"
/>
<IPermission
Class = "System. Security. Permissions. SecurityPermission, mscorlib, Version = 1.0.5000.0, Culture = neutral, PublicKeyToken = b77a5c561934e089"
Version = "1"
Flags = "Execution"
/>
<IPermission class = "Microsoft. SharePoint. Security. WebPartPermission, Microsoft. SharePoint. Security, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c"
Version = "1"
Connections = "True"
/>
<IPermission class = "Microsoft. SharePoint. Security. SharePointPermission, Microsoft. SharePoint. Security, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c"
Version = "1"
ObjectModel = "True"
/>
</PermissionSet>
</CodeAccessSecurity>
<! --
The MSI specific information. This determines the name of the MSI Installer and the Web
Part package that is created. The name of the Web Part package in this case will be
MyWebPart_Microsoft Corporation. cab. The total length of the MSI Name and Manufacturer
Shocould be less than 225 characters.
-->
<! -- Edit 3: Name: the packaged. msi file Name; Version: Version; Manufacturer developer information -->
<MSI Name = "MyWebPart2" Version = "1.0.0.1" Manufacturer = "LiYP"/>
</Wppackager>
3.3 generate the. MSI installation package
:
3.4 install MyWebPart2.msi ,:
3.5 Delete MyWebPart2.msi ,: