locked
unable to add TSPortalWebPart as a safe control RRS feed

  • Question

  • In 64-bit WSS 3.0 SP2 on Server 2008 R2 following the instructions in http://technet.microsoft.com/en-us/library/ee344839(WS.10).aspx I am unsuccessful at adding the TSPortalWebPart as a safe control.  Everytime I add the Safe Control statement to the \inetpub\wwwroot\virtualdirectories\80\web.config I lose ALL my web parts, when I delete the line everything works again.  I am editing the web.config as Admin and restarting the site after editing.  My WSS 3.0 SP2 installation is fresh on a new, clean install server 08 R2 running RD Web Access and RD gateway.  Everything in RDS is running fine.  The site is a simple one-site collection for testing.

    I had absolutely no problem implementing this exact same web part in WSS 3.0 SP1 on Server 08 first edition running TS Web Access and TS Gateway 2 years ago, I don't understand.


    MCITP:Enterprise Admin MCSA, MCSE, MCDBA
    Monday, November 15, 2010 11:24 PM

Answers

  • By bin folder, I mean C:\Windows\Web\RDWeb\Pages\Bin, which is installed by Remote Desktop Web Access;

     

    By GAC, I mean the %windir%/assembly folder, you should be able to find the TSPortalWebPart there(shown with version and public key token).  As described in the comments in http://technet.microsoft.com/en-us/library/cc771354(WS.10).aspx , if you are using Windows 2008 server R2 x64, the version number will be 6.1.0.0 instead of 6.0.0.0, you need to modify the SafeControl  section and web.config and the image folder name accordingly:

     

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

     

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

     

    And other things you need to take care are:

     

    Instead of Assign the Network Service account the Full Control permission to the Images folder, as required in http://technet.microsoft.com/en-us/library/cc771354(WS.10).aspx, you need to assign the SharePoint Web Application Pool identity the Full Control permission to the Image folder. If you have SharePoint standalone installation, the web application pool identity will default to Network Service account.

                   

    After creating the image folder, you need to copy image files from C:\Windows\Web\RDWeb\Pages\images (which is installed by Remote Desktop Web Access) into it.

     

    The Remote Desktop Web Access will be installed as application RDWeb under the IIS Default Web Site. If your have SharePoint site on port 80 (as in the standalone installation), the IIS default web site may have been stopped to avoid conflict. You may extend SharePoint web application to other port or Hostheader, and remove the site on port 80, so that you can start the IIS default web site.

     

     

     

    Gu Yuming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com

    • Marked as answer by GuYuming Friday, November 26, 2010 5:32 AM
    Thursday, November 18, 2010 7:43 AM

All replies

  • Could you please be more specific about "I lose all my web part"?

     

    And can you find the assembly added as safecontrol in GAC or the bin folder?

     

     

     

    Gu Yuming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com

    Tuesday, November 16, 2010 1:59 AM
  • After editing the web.config file to add the TSPortalWebPart as a Safe Control, when I go back and open the site, all of the web parts on the entire site display the following error message: 

    Web Part Error: This page has encountered a critical error. Contact your system administrator if this problem persists.

    The web part is not in the bin folder in inetpub\wwwroot\wss\virtualdirectories\80, in fact that bin folder is completely empty

    I don't know what you mean by GAC, but when i try to go to Site Settings, Web Part Gallery, all i see is the same error mesage above with no web parts displayed to choose from.


    MCITP:Enterprise Admin MCSA, MCSE, MCDBA
    Tuesday, November 16, 2010 2:39 PM
  • By bin folder, I mean C:\Windows\Web\RDWeb\Pages\Bin, which is installed by Remote Desktop Web Access;

     

    By GAC, I mean the %windir%/assembly folder, you should be able to find the TSPortalWebPart there(shown with version and public key token).  As described in the comments in http://technet.microsoft.com/en-us/library/cc771354(WS.10).aspx , if you are using Windows 2008 server R2 x64, the version number will be 6.1.0.0 instead of 6.0.0.0, you need to modify the SafeControl  section and web.config and the image folder name accordingly:

     

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

     

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

     

    And other things you need to take care are:

     

    Instead of Assign the Network Service account the Full Control permission to the Images folder, as required in http://technet.microsoft.com/en-us/library/cc771354(WS.10).aspx, you need to assign the SharePoint Web Application Pool identity the Full Control permission to the Image folder. If you have SharePoint standalone installation, the web application pool identity will default to Network Service account.

                   

    After creating the image folder, you need to copy image files from C:\Windows\Web\RDWeb\Pages\images (which is installed by Remote Desktop Web Access) into it.

     

    The Remote Desktop Web Access will be installed as application RDWeb under the IIS Default Web Site. If your have SharePoint site on port 80 (as in the standalone installation), the IIS default web site may have been stopped to avoid conflict. You may extend SharePoint web application to other port or Hostheader, and remove the site on port 80, so that you can start the IIS default web site.

     

     

     

    Gu Yuming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com

    • Marked as answer by GuYuming Friday, November 26, 2010 5:32 AM
    Thursday, November 18, 2010 7:43 AM
  • Gu, thanks for the help so far.  I checked the things you mentioned.  Still having a problem, but not as bad as before.

     

    In c:\windows\web\rdweb\pages\bin there is a tsportalwebpart dll file and a folder named “en” that contains a tsportalwebpart.resources dll file

     

    In c:\windows\assembly there is a tsportalwebpart assembly with the 6.1.0.0 version and the public key token of 31bf3856ad364e35

     

    Here is the exact statement I inserted at the end of the <safecontrols> section of the web.config file in c:\inetpub\wwwroot\wss\virtualdirectories\80\ (the only other web app is the central admin site)

     

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

     

    The \image and \rdp folder exist in c:\program files\common files\microsoft shared\web server extensions\wpresources\tsportalwebpart\6.1.0.0__31bf3856ad364e35 and have the Network Service account added with full control as I have a default standalone installation.    I verified in IIS that the sharepoint web app pool identity is in fact the network service.

     

    My WSS site has a host header with a DNS entry so that the default website can also run on port 80, both sites are running.

     

    The \tsportalwebpart\6.1.0.0__31bf3856ad364e35\images folder was empty so I copied all of the images from C:\Windows\Web\RDWeb\Pages\images to it. 

     

    When I open my site I have content now, but I still cannot add the TSPortalWebPart.  I can go to the Web Part Gallery and add it to the Gallery.  But when I go to my Site Settings, Edit Page, and try to add the TSPortalWebPart I get an error stating “the TSPortalWebPart web part appears to be causing a problem.  Could not find the path to c:\inetpub\wwwroot\wss\VirtualDirectories\80\images\rapwait.gif”.


    MCITP:Enterprise Admin MCSA, MCSE, MCDBA
    Friday, November 19, 2010 5:39 PM
  • I don't know if this is "the answer" or not but I was comparing settings in Central Admin between my new test site (where the TSPortalWebApp isn't working) and my production WSS 3.0 site (where the TSPortalWebApp is working) and noticed that the Primary Site Collection Administrator for the problem Web Application was set to NT Authority\Network Service which didn't match what was set in my production WSS 3.0 environment.  So, I changed the Site Collection Admin for the problem Web App to the machine local administrator account and weirdly enough the TSPortalWebPart suddenly began working as advertised.  I don't understand it, but it's working now.  Thanks again for the help Gu Yuming.


    MCITP:Enterprise Admin MCSA, MCSE, MCDBA
    Wednesday, November 24, 2010 7:26 PM
  • Sorry for the delay. Please check in IIS Manager if there is a virtual directory called _wpresources under your SharePoint site mapped to the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources folder.  If not, you can add the virtual directory manually in IIS Manager. And paulmo’s January 21, 2009 8:33 AM reply in http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/7be53547-2ec6-4fdc-9674-5ca3e556e858 address the same issue.

     

     

     

    Gu Yuming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfb@microsoft.com

    Friday, November 26, 2010 4:32 AM
  • Yes, that VD was there and was pointed to the correct physical path.  The TSPortalWebpart did work, for a week.  Then I unextended/re-extended the site to fix a search error (event ID 2436 errors as in http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/f2e57c5e-e6c9-48bf-a341-f64759fad249) and of course the TSPortalWebPart stopped working.  not surprising. it's a new web config file.

    So, I removed the non-functioning web part from the page, re-typed the safe control statement into the new web config file using notepad as admin, reset IIS, re-added the web part to the web part gallery with overwrite box checked, and verified that all of the physical and virtual directories were intact and correct and had the correct permissions still.  Tried re-adding the web part back to the original page and got a similar path error message  as above and a prompt to remove the webpart.  Ignored the error prompt and restarted the entire server and the site and webpart work correctly.  Wow, what an adventure. it shouldn't be this difficult.


    MCITP:Enterprise Admin MCSA, MCSE, MCDBA
    Thursday, December 2, 2010 6:01 PM