Friday 28 February 2014

Resolve Issues in TFS Team Project Portal in SharePoint 2013 Enterprise

Once TFS configured to use a SharePoint 2013 enterprise, it needs to be configured for dashboard compatibility - (SharePoint Server only sections).

03.02

If SharePoint Enterprise 2013 is in a different box from TFS, there are few issues that needs to be fixed one time, for all team projects to correctly load reports team project portal.

Issue 01

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

 

This error occurs since SharePoint unable to access TFS database. Open SQL port (default 1433) as inbound rule in Window Firewall resolved the error and Issue 02 is next :) .

 

Issue 02

Message below appears

Be careful. This workbook contains one or more queries that might be unsafe. Do you want enable these queries?

02.01

 

Click on Yes will give below message

An error occurred during an attempt to establish a connection to the external data source. The following connections failed to refresh. TfsOlapReport

02.02

 

My guess this should be something to do with analysis services. This forum answer confirms it. Opened analysis services port (default 2383) in TFS SQL server did the trick.

02.03

 

Issue 03

 

Whenever portal revisited or refreshed again this message appears for all reports in team project portal.

02.01

 

This article explains how to fix this issue.

 

03.01

When this is unchecked and saved as explained in the article, it fixes the issue for future team projects to be create as well.

Wednesday 26 February 2014

TFS Build with Password Protected PFX (Resolve Cannot import the following key file)

Today I ran into a problem with one of development team insisting to use the .pfx file signing assembly  and they wanted it to be built by the build server.

But when I configures the build it started failing giving the error "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (2482): Cannot import the following key file: key1.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_7174AB5A189B7774"


My normal advice to any one is to use .snk instead of .pfx so you do not have to import the keys or below mentioned steps in build server. But this team has not given me any chance so I had no choice.

So I spent about an hour google for a solution. Finally managed to fix my issue by doing below steps.

1. Logged into my build server with my account and executed sn -i key1.pfx VS_KEY_7174AB5A189B7774 in developer command prompt. (VS_KEY_7174AB5A189B7774 here is the key container name provided in thee build error)

2. Queued build with no luck.

3. With the advice here logged on to Build Server with TFS build service account and tried executing sn -i key1.pfx VS_KEY_7174AB5A189B7774


4. With the advice here 

 
 I tried executing sn -d  VS_KEY_7174AB5A189B7774 and got the below error

WOW ... It says it exist and it says it is not there...

5. Thought for few minutes I signed out of build server from TFS build service account and logged in back with my user account. and executed sn -d  VS_KEY_7174AB5A189B7774 and it worked and deleted the key container.

6. I signed out of the build server from my account and signed in with TFS build service account and executed sn -i key1.pfx VS_KEY_7174AB5A189B7774 this time the key installed without any issue.

Queued the build again and ..Success at the end.




Tuesday 25 February 2014

06. Setup a Build Server - Setup Virtual Environment for TFS 2013 - Using Virtualbox


In this step of Setup Virtual Environment for TFS 2013 - Using Virtualbox, I will explain how to setup a build server for TFS.

01. First setup an account in PDC as TFS build service




02. Set up a new virtual machine in Oracle Virtual Box for TFS Build server. Set network to isolated internal network.





03. Change the machine name,, set IP and add to domain.









04. Select restart later and add TFA Admin account to local administrators group.








05. Restart the machine and login as TFS Admin.

  

06. Enable File and Printer sharing for the domain, to allow network access.



07. Run mmc and add Group Policy Object snap in to change local computer policies.



08. Add build service account for Log on as a service.


09. Install TFS.




10. Run build service configuration wizard.



11. Select the team project collection



12. If  any issues related to selecting TFS server go to IE options and add tfs root to trusted sites.



13. TFS server can be connected with added to trusted sites. Select the project collection for the build server.



14. Set the number of build agents depending on the number of CPU cores.



15. Set the build service account.


16. Review and configure.







17. Close the wizard and  start the build service, controller and agents.


Oops. Something is wrong. Service starts and stops suddenly. Done some search and really useful info here http://nakedalm.com/tfs-2012-issue-stuck-builds-in-team-foundation-build-with-no-build-number/

But the issue of multiple site bindings was not an issue for me here. So I did not proceed to set multipleSiteBindingsEnabled to true as specified in the above link.


18. After hour or two of search in www without any other valid solution just tried ping the TFS server from the build server. Since its shown resolving with IPv6 added below to hosts file.


19. It did the trick and Build Services are up and running for my TFS environment.


The next step is to install Visual Studio versions and any other required stuff in build server to support the developments solutions build, which I will not explain here.


Popular Posts