WEBSITE

Windows Small Business Server 2011 : Customizing a SharePoint Site - Customizing Companyweb (part 4) - Adding RemoteApps Links - Register the Web Part as Safe

11/18/2013 8:19:48 PM
23.2.2.3. Register the Web Part as Safe

Next you need to register the Web Part you’re going to use as a safe control. This allows it to run without needing an elevated prompt. To register the Web Part, follow these steps:

  1. Open an elevated Cmd or PowerShell command prompt using Run As Administrator.

  2. Change to the directory where the configuration file for Companyweb is, and open web.config in Notepad or your favorite plain-text editor as shown in Figure 19 by entering the following commands:

    cd "C:\inetpub\wwwroot\wss\VirtualDirectories\Companyweb80"

    notepad web.config

    Figure 19. Editing the web.config file for Companyweb

  3. In the web.config file, locate the <SafeControls> section of the file. At the end of the section of SafeControl Assembly entries, add the following line:

    <SafeControl Assembly="TSPortalWebPart, Version=6.1.0.0, Culture=neutral,PublicKe
    yToken=31bf3856ad364e35" Namespace="Microsoft.TerminalServices.Publishing.Portal"
    TypeName="*" Safe="True" AllowRemoteDesigner="True" />



    Note:

    Add this as a single line, with no line breaks.


  4. Save the change and exit Notepad. Keep the elevated command prompt open. You’ll need it in the next section.


Warning:

IMPORTANT Always make a copy of important files before editing them—just in case.


2.4. Create a Folder to Store the Web Part

Next you need to create a folder to hold the Web Part and its images, and to give the Network Services account full control on the folder. Use the following steps:

  1. In the elevated command prompt from the previous section, type the following commands:

    mkdir "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\
    wpresources\TSPortalWebPart\6.1.0.0__31bf3856ad364e35\images"

    mkdir "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\
    wpresources\TSPortalWebPart\6.1.0.0__31bf3856ad364e35\rdp"



    Note:

    Notice the two underscores after 6.1.0.0 in the preceding command lines.


  2. Change the directory to the parent folder of the two folders you just created:

    cd "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\
    wpresources\TSPortalWebPart\6.1.0.0__31bf3856ad364e35"

  3. Give the Network Service account and the spwebapp account full control over the two folders you created in step 1:

    cmd /c icacls images /grant NetworkService:F

    cmd /c icacls images /grant spwebapp:F

    cmd /c icacls rdp /grant NetworkService:F

    cmd /c icacls rdp /grant spwebapp:F

  4. Close the Command Prompt window if you see a success message.

Other  
  •  Windows Small Business Server 2011 : Customizing a SharePoint Site - Introducing SharePoint Foundation 2010
  •  Sharepoint 2010 : The Search User Interface - The People Search Page (part 3) - Expertise Search, The Preferences Page
  •  Sharepoint 2010 : The Search User Interface - The People Search Page (part 2) - Using People Search Results, Taking Action on Results
  •  Sharepoint 2010 : The Search User Interface - The People Search Page (part 1) - People Search Options
  •  Sharepoint 2010 : The Search User Interface - The Advanced Search Page (part 2) - Picking Property Restrictions
  •  Sharepoint 2010 : The Search User Interface - The Advanced Search Page (part 1) - Keywords on the Advanced Search Page
  •  Sharepoint 2010 : The Search User Interface - Search Query Syntax - Property Restrictions
  •  Sharepoint 2010 : The Search User Interface - Search Query Syntax - Search Query Operators
  •  Sharepoint 2010 : Creating a Workflow Using SharePoint Designer
  •  Sharepoint 2010 : Creating a Workflow Using Visual Studio 2010 - Using the Visual Studio Workflow Designer (part 2)
  •  
    Top 10
    Review : Sigma 24mm f/1.4 DG HSM Art
    Review : Canon EF11-24mm f/4L USM
    Review : Creative Sound Blaster Roar 2
    Review : Philips Fidelio M2L
    Review : Alienware 17 - Dell's Alienware laptops
    Review Smartwatch : Wellograph
    Review : Xiaomi Redmi 2
    Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
    Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8