Subscribe:

Labels

Tuesday, June 7, 2011

Configure and deploy Web Parts (SharePoint Server 2010)


Created Web parts to display the all the Creation of DMS and Search
The dll’s of web parts are placed in the bin folder of the site (GISSHARE04- port 80) which is located in the Path “C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin” and the Custom User controls are placed in the “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\ControlTemplates”.

1.1     Configuration options

  • Bin directory   Stored in the bin folder under the root directory of your Web application.
  • Global Assembly Cache (GAC)   All standard Web Parts are automatically installed in the GAC, where the common language runtime of the .NET Framework is located, at %windir%\assembly. Web Parts stored in the GAC can be shared across applications. 

1.2     Deploy and configure a Web Part

The developed Web Part is a single dynamic-link library (DLL) file, can manually deploy the DLL by copying it to Web application’s Bin folder.

1.2.1     To manually deploy and configure a Web Part

    • Verify that you have the following administrative credentials:
    • You must be a member of the local Administrators group on the server hosting SharePoint Server.
    • Copy the <YourWebPartName>.dll assembly in the project's Bin directory to the Bin directory in your Web application root directory. For example: C:\inetpub\wwwroot\wss\VirtualDirectories\80\.
    • Locate the Web.config file in your application root directory and open it for editing.
    • Add the following safe-control entry for your custom assembly to the Web.config file:
<SafeControl Assembly="<YourWebPartName>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null” Namespace="<YourWebPartNamespace>" TypeName="*" Safe="True" AllowRemoteDesigner="True"/>
Where:
  1. <YourWebPartName> is the name of the Web Part that is being deployed.
  2. <YourWebPartNamespace> is the namespace that is associated with your Web Part.

1.3     Add a component to the Web Part Gallery

1.3.1     To add a component to the Web Part gallery

1.       Verify that you have the following administrative credentials:
    • You must be a member of the Farm Administrators group.
2.       To create a .webpart file, navigate to http ://< MyServer>/_layouts/newdwp.aspx, where <MyServer> is the name of the server on which your SharePoint site is deployed.
3.       Select the check box next to <YourWebPartNamespace>.<YourWebPartName>.
4.       Click Populate Gallery to add the YourWebPartName Web Part to the Team Site gallery.
5.       In the Web Part gallery, select Edit to edit the Web Part, and then click Import.
You are prompted to specify a location for the .webpart file. You can also export ASP.NET Web Parts and import them to SharePoint sites.

3 comments:

  1. Hi,

    I have developed
    =>5 custom webparts
    =>5 custom workflows
    =>5 custom Features

    How can I send these to client machine and deploy those?

    please can you send me(kumar423m@hotmail.com) the procedure, How to transfer
    and deploy them into the client machine?

    Kumar.M
    kumar423m@hotmail.com

    ReplyDelete
  2. Hi Kumar,

    What ever u developed Artifacts na that all u will get DLL .

    with this Dll s u can create one WSP.

    just move this to production and deploy with STSADM tool .

    Again here we have two options to create a WSP

    One is Automatic,
    Manual.

    Automati:-using WSP builder we can create.
    Manual:- we need to creat manifest.xml we some simpel steps.

    I will post that one

    I think this is enoug for ur requiremnt.

    ReplyDelete
  3. How Populate Gallery using power shell???
    pls mail at lalit85lovely4u@gmail.com

    ReplyDelete