Wednesday, October 17, 2012

TFS 2012 Installation - TFS Sharepoint Extension (Part-3)

This is a continuation of the following posts:


The steps here illustrates the installation and configuration of TFS Extension for SharePoint (2010).  This assume you have an existing SharePoint farm you want to integrate TFS with.

  1. For DOMAIN\_TFSService account, grant the following rights:
    Add this account to the Farm Administrators group in Sharepoint- Add this to the  "Policy for Web Application" for that web app
  2. Launch the tfs_sharePointExtensions.exe file from the SharePoint Extensions folder to install only the Team Foundation Server Extensions for Sharepoint Products.  NOTE:  If your SharePoint consist of multiple servers, you will need to perform the first SharePoint extension install on the server that hosts the Central Admin.







Provide the TFS server url and the SharePoint Web App URL

When you are done with the initial server, continue to install TFS SharePoint Extension on the remain SharePoint WFE server(s).

 Once you are done with the above, you will need to configure the TFS server to talk to SharePoint:

  1. Launch the TFS Admin Console from the TFS Server
  1. Under Application Tier, select  SharePoint Web Applications
  1. Click Add under the SharePoint Web Applications category and provide the info as shown below:

TFS 2012 Installation - Adding additional App Tier (Part-2)

This is a continuation of TFS 2012 Installation - Build out initial farm (Part-1).  The steps here illustrates how you would add an additional app tier to your TFS farm.


  1. Please refer to the previous post for service account requirements.
  2. If your SQL, SSRS, and SSAS are located on a different server, you need to Install SQL Client Tools first by:
    • Runnning the SQL setup on the TFS machine
    • Select Client Tool Concectivity & Client Tool SDK
    • Install
  3. Run "tfs_server.exe" as Administrator
  4. Select Application-Tier Only and click Start Wizard and follow the wizard:



Enter the database server name and click List Available Databases.  Select the TFS_Configuration database and click Next.





TFS 2012 Installation - Build out initial farm (Part-1)

I just finished implementing a new TFS 2010 farm.  This farm consist of two App Tier servers.  The data tier consist of a SQL 2008 R2 cluster.  The below instruction is for creating your initial farm or the very first server:


  1. Service Accounts:
    • Domain\_TFSSetup
      - Add to server's local Admin Group
      - Grant SQL "severadmin" role
    • Domain\_TFSService
      - Add to local security policy "Log on as a service" on the app tier server.
      - Grant db-owner and db-crate 
      for any databases that Team Foundation Server uses
    • Domain\_TFSReports
      Add to local security policy "Log on as a service" on the app tier server.
      - Grant TFSWareHouseDataReader on the report server
  2. If your SQL, SSRS, and SSAS are located on a different server, you need to Install SQL Client Tools first by:
    • Runnning the SQL setup on the TFS machine
    • Select Client Tool Concectivity & Client Tool SDK
    • Install
  3. Run "tfs_server.exe" as Administrator
  4. Select Advanced and click Start Wizard and follow the wizard:
Enter the SQL server name or the cluster alias
It is a good idea to have a service account.  For me, I have an AD account called _TFSService
If you have SSRS setup, enter the requested info.  Otherwise, you can skip it for now.
If you have SSAS setup, enter the requested info.  Otherwise, you can skip it for now.
You can create your first Project Collection if you want or do it later






MS Project 2010 - Access Denied Error 70

If your users are getting error similar to the following:


... try doing this:

  1. Exit MS Project
  2. Clear/remove all temp files from c:\windows\temp
  3. Go to the properties for c:\windows\temp. Uncheck the "Read-Only" checkbox and click apply.
  4. Clear/remove all temp files from C:\Users\USERNAME\AppData\Local\Temp
  5. Go to the properties for C:\Users\USERNAME\AppData\Local\Temp. Uncheck the "Read-Only" checkbox and click apply.
  6. Open MS Project
  7. Clear Cache
  8. Archive again

Project Server 2010 - Orphan baseline tasks

PROBLEM:
In the past year or so, I have been seeing the following errors in the job queue


ReportingProjectChangeMessageFailed (24006) - The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MSP_EpmTaskBaseline_ProjectUID_TaskUID". The conflict occurred in database "ProjectServer_Reporting", table "dbo.MSP_EpmTask". The statement has been terminated..

GeneralQueueJobFailed (26000) - ReportingProjectPublish.ReportProjectPublishMessageEx



SOLUTION:

The temp workaround is to run the following SQL scripts:


select PROJ_NAME, MTB.PROJ_UID,TASK_UID,TB_BASE_NUM from MSP_TASK_BASELINES MTB
inner join MSP_PROJECTS MP on MTB.proj_uid=MP.proj_uid
where TASK_UID not in (select TASK_UID from MSP_TASKS)
order by PROJ_Name

delete from MSP_TASK_BASELINES where TASK_UID not in (select TASK_UID from MSP_TASKS) 


The permanent solution is to apply the hotfix from Microsoft... http://support.microsoft.com/kb/2598351


Project Web App Cannot connect to Project Server


PROBLEM




System.ServiceModel.FaultException`1[[Microsoft.Office.Project.Server.Interfaces.DefaultServerFault, Microsoft.Office.Project.Server.Communications, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c]]: The databases are out of the range of compatibility, upgrade your databases.   Server stack trace:    
 at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)   
 at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)   
 at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)   
 at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)    Exception rethrown
 at [0]:    
 at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   
 at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   
 at Microsoft.Office.Project.Server.Interfaces.IAuthentication.GetUserByName(String username)   
 at Microsoft.Office.Project.Server.AuthenticationHelper.AuthenticateUserByName(String userName, Guid siteId)   
 at Microsoft.Office.Project.PWA.PJContext.AuthenticateUserForPWA(Boolean needToValidateUser, String username, Guid siteId)

PROBLEM

If you get the above, you can try the following:

  1. Start and restart the Project Services
  1. Run the SP Configuration Wizard on the Project Server


Lesson Learned - SharePoint 2010 Search Service Application


Recently I was having issues with the Search Service Application on SP 2010 farm.  I decided to remove it and re-create it from scratch.  During the removal, however, the process seems to have hung up for some reason.  I went ahead any manually clean things by doing the following:
  • Ensure the old SSA instance is gone (Stop-SPServiceInstance)
  • Remove old SSA if still there (Stsadm -o deleteconfigurationobject -id {GUID})
  • Delete old service application pool (Remove-SPServiceApplicationPool)
  • Delete the older search databases from SP (Get-SPDatabase) and from SQL.
Since I have successfully done this many times in the past, re-creating the SSA should be breeze right? Wrong!!!!

PROBLEM
My initial attempt is to go thru Central Admin to create the SSA but the creation process just stays or hangs until it times out hours later.  I have tried using powershell script and the result was the same.  When I look at the Service App, I do see the Search Admin Web Service get created/started.  I also search the Search Service Application... but with the following error:
"The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component 'cae20adf-f859-4a81-be8b-87b47c7921fa' in search application 'Server Search Application' is in a good state and try again."
Each time, I made sure to clean up the services apps, databases, service instances, and proxy before attempting to re-create.  I am using a managed account for the search service.  On the database site, I am seeing 
"Login failed for user 'DOMAIN\FARMACCOUNT'. Reason: Failed to open the explicitly specified database."
When I click on the "Modify Topology", I get an exception.  Below is the entries in the log:
Unhandled page level exception. Path: /_admin/search/searchconfigwizardtopologyconfig.aspx, Error: Exception has been thrown by the target of an invocation., Details: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.    
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControlDataLayer.AddAdminTopologySettingsToTable()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControlDataLayer.GetComponents(String searchAppGuidParam, String viewTypeParam)     -
 -- End of inner exception stack trace ---  
 at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)  
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)  
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  
 at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)  
 at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)  
 at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)  
 at System.Web.UI.WebControls.DataBoundControl.PerformSelect()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.RefreshGridView()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.Initialize()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.CreateChildControls()  
 at System.Web.UI.Control.EnsureChildControls()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControlDataLayer.AddAdminTopologySettingsToTable()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControlDataLayer.GetComponents(String searchAppGuidParam, String viewTypeParam)     -
 -- End of inner exception stack trace ---  
 at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)  
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)  
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  
 at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)  
 at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)  
 at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)  
 at System.Web.UI.WebControls.DataBoundControl.PerformSelect()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.RefreshGridView()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.Initialize()  
 at Microsoft.Office.Server.Search.WebControls.TopologyWebControl.CreateChildControls()  
 at System.Web.UI.Control.EnsureChildControls()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Control.PreRenderRecursiveInternal()  
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

SOLUTION
After banging my heads for several days, I decided to contact MS Support for help.  In addition to the cleanup steps I've mentioned earlier, we were able to resolve the issues by taking additional steps:
  1. Clear out the CacheStop the Sharepoint Timer services on all WFE and App servers.  Go to "C:\ProgramData\Microsoft\SharePoint\Config\[GUID]".  Other than Cache.ini, delete everything  under C:\ProgramData\Microsoft\SharePoint\Config\[GUID] directory.   Update the cache.ini and change the number to 1 and save it.  Start the Timer services again.
  2. Review Job DefinitionGo to http://CentralAdmin/_admin/ServiceJobDefinitions.aspx page.  See if there's any phantom jobs (job with only GUID but no details) and remove them if exist.
  3. Stop and restart "Sharepoint Server Search 14"
  4. Stop and restart Search Query and Site Settings Service

One you have verified all the above.  Trying creating the SSA again.  Hope this helps someone.


Monday, February 13, 2012

Can not activate Sharepoint Server Publishing

I recently upgraded from SP2007 to SP2010 thru DB attached.  I noticed one of my site collection's Sharepoint Server Publishing Infrastructure and Sharepoint Server Publishing were not activated. I went ahead and activate the infrastructure on the site collection but when I try to activate the publishing on the site level it failed. I try to activate using command line:

stsadm -o activatefeature -name PublishingWeb -url http://mydomain.com/test
but got the following....

Provisioning did not succeed. Details: Failed to initialize some site properties for Web at Url: 'http://mydomain.com/test' OriginalException: List does not exist.
The page you selected contains a list that does not exist. It may have been deleted by another user.

After some further research, it looks like the hidden "Quick Deploy Item" and a host of other key list were not there.  Now sure how this happened but I have tried various suggestions to no avail. 

SOLUTION:  Okay... I open a support ticket with MS Support. We ended up solving the issue by issuing by following comannds:

stsadm -o activatefeature -filename publishing\feature.xml -url http://...-force
stsadm -o activatefeature -filename publishingresources\feature.xml -url http://...- -force
stsadm -o activatefeature -filename publishingSite\feature.xml -url http://...- -force
stsadm -o activatefeature -filename publishingweb\feature.xml -url http://...- -force
stsadm -o activatefeature -filename publishinglayouts\feature.xml -url http://...- -force
stsadm -o activatefeature -filename navigation\feature.xml -url http://...- -force

NOTE: You need to execute the aboe on all subsites that are affected. Hope this help someone.

Wednesday, February 8, 2012

Search not returning result for other domain users


I have a strange situation when users from other domain does not get any results when they perform a search. Here's the scenerio:
  1. I recently upgraded the farm from Sp2007 to Sp2010.
  2. Crawl jobs all completed successfully
  3. Our domains:
    - myco.com
    - eu.myco.com
  4. User from myco.com can search fine.
  5. Search performed by user from eu.myco.com return nothing... envon on simple search where I am sure they have access to. Also, they didn't have this problem in SP2007.
  6. These eu.myco.com users does have access to the sharepoint sites.
  7. It is similar to the issues describe in this discussion: http://social.microsoft.com/Forums/en-US/partnerofficesharepoint/thread/b547461a-e47b-4b54-980d-d6b36e244bae.  The fix was to add the search/servcie account to the Windows Authorization Access group.
  8. In my case, I need to add the service account to the Windows Authorization Access group on ALL the domains.

Missing Some Basic Webparts After SP2010 Upgrade

I have recently upgraded from SP2007 to SP2010 (enterprise). Now, when I try to add a webpart, I don't see the Content Editor webpart under the media category. I am a farm admin and I can see it. This is what I have done so far:
  • Checked the permission to webpart gallary. They all looked fine
  • Checked the site collection's publsihing infrastructure feature and site level publishing feature. They are both enabled already. I went and disable and re-eanble any way.
  • Went to Central Admin -> Upgrade and Migration and ran the "Enable features on Existing Sites".
  • Checked the webpart gallery but didn't see the MSContentEditor.dwp on the list. Click new but still see it from the list.
What what else am I missing.    I seem to be missing some basic webparts... webparts like RSS Feed is not showing up when I add webpart. 

Okay... after some more digging into his. I was able to resovle by running the following script to disable and re-enable the: 1) Basic Web Part; 2) Standard Site Collection Feature; and 3) Enteprise Site Colleciton Feature. The script traverse thru the web, locate the site collections, and disable/enable the features:

$webApp = Get-SPWebApplication -Identity http://yourwebapp
$webApp | Get-SPSite -limit all | ForEach-Object {Disable-SPFeature -Identity "BaseSite" -Url $_.Url -Confirm:$False}
$webApp | Get-SPSite -limit all | ForEach-Object {Enable-SPFeature -Identity "BaseSite" -Url $_.Url}
$webApp | Get-SPSite -limit all | ForEach-Object {Disable-SPFeature -Identity "PremiumSite" -Url $_.Url -Confirm:$False}
$webApp | Get-SPSite -limit all | ForEach-Object {Enable-SPFeature -Identity "PremiumSite" -Url $_.Url}

Note that manually deactivate and activate these features thru the Site Collection Feature page does not help. For some reason, it needs to be done thru the command line.