Where should I store documents – TFS or SharePoint?
This was the question which came up during our internal development meeting and hence I had to explore more in depth, rather than closing the topic saying – “Documents in SharePoint & source code in TFS”.
My perception here is – It depends on who the proposed end users are.
Since documents related to development needs to be shared and updated within the development team most of the time, it is generally advised to store the documents within TFS. After that – based on the needs (sharing them outside the development team), portal site can be used to share the documents. Please note that in order to ease out this operation, code collection can be associated with an appropriate document library within SharePoint portal.
But on the other hand SharePoint seems to be general preference to store Project related documents over TFS– for the simple reason that it is easily accessible and with Versioning ON (while using a document library). But versioning is very limited in SharePoint as compared to TFS, but works well for documentation.
As far as configuring document library to store documents – it’s pretty straightforward.
Regarding configuring TFS to store documents, it is similar to projects – creating a folder structure to accommodate all types of documents. Check-in/out is same as how we do it with our source code. While using TFS, we may have to compare different versions – for which we wouldn’t be able to us TFS’s inbuilt compare tool since it compares only binary content. Below are couple of other options:
- Diffdoc – has the capability to compare documents
- Using tools available within SVN
- Other 3rd party tools
Here’s a link which helps with configuring the tools within TFS. Here’s another link which helps in configuring SVN to compare documents.
As far as accessing documents and files outside of Visual studio, we have 2 options
- Using web installation part of of TFS – http://xoxo:8080/tfs/.
- Using Team Explorer 2010 – Here is the link to ISO download
Hiding “Back” button in jquery mobile framework
This post is for users who have already used previous versions of jquery mobile framework during their development and are stuck with the default “Back” button when data-role=”header” is used.
In case of jquery mobile Alpha 3, here is the syntax:
<div data-role="header" data-backbtn="false">
Below syntax is for Alpha2:
<div data-role="header" data-nobackbtn="true">
Once the back button is removed, there’s a way to add it back in their respective pages.
<a href=”#” class=”ui-btn-left ui-btn-back” data-icon=”arrow-r”>Back</a>
where arrow-r helps in including an icon with right arrow.
The description for Event ID 9001 from source TFS Services cannot be found.
I ran into this issue after updating a patch related to TFS. The Team Foundation Administration console reported errors on all the * URL: <<Error retrieving the details>>. I suspected that there should be some connectivity issues related to database, thus my next target was to dig in further for details both in event viewer and the IIS logs. I could see that there were errors being logged in event viewer continuously with the details as seen below:
The description for Event ID 9001 from source TFS Services cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 2/21/2011 8:58:55 AM
Machine: VM2-TFS
Application Domain: /LM/W3SVC/8080/ROOT/tfs-1-129427358458749059
Assembly: Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Service Host:
Process Details:
Process Name: w3wp
Process Id: 3680
Thread Id: 1976
Account name: [DOMAIN\USERNAME]Detailed Message: Application Request Processing Started
Server Version = Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Service Account = PREPRO\administrator
Machine Name = VM2-TFSException Message: TF246017: Team Foundation Server could not connect to the database. Verify that the server that is hosting the database is operational, and that network problems are not blocking communication with the server. (type DatabaseConnectionException)
Exception Stack Trace: at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(Int32 errorNumber, SqlException sqlException, SqlError sqlError)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(SqlException sqlException)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior)
at Microsoft.TeamFoundation.Framework.Server.ExtendedAttributeComponent.ReadDatabaseAttribute(String attributeName)
at Microsoft.TeamFoundation.Framework.Server.DatabaseConnectionValidator.ValidateDatabaseInstanceStamp(String configConnectionString, Guid configInstanceId)
at Microsoft.TeamFoundation.Framework.Server.DatabaseConnectionValidator.ValidateApplicationConfiguration(String configConnectionString, Guid configInstanceId, List`1 sqlInstances, String analysisInstance, String analysisDatabaseName, Boolean ignoreAnalysisDatasourceUpdateErrors, Boolean autoFixConfiguration, Boolean fullValidation, DatabaseVerificationDatabaseTypes continueOnMissingDatabaseTypes)
at Microsoft.TeamFoundation.Framework.Server.ApplicationServiceHost..ctor(Guid instanceId, String connectionString, String physicalDirectory, String plugInDirectory, String virtualDirectory, Boolean failOnInvalidConfiguration)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationApplication.AttemptStart()
After digging further to the worker process logs, I tried looking further into IIS website configuration settings. Ultimately it turned out to be the Application pool configuration – which had got messed up. After running the patch, it had somehow modified the app pool configuration to point to ASP.NET 2.0 instead of ASP.NET 4.0. Reverting back to 4.0 did the trick – of course after an iisreset.
Unable to determine the source control server – TF Destroy (TFS)
We are running couple of tests before we perform the actual migration our source code content from SVN to TFS 2010. Since we are still in testing phase, we are running into couple of problems, one of them being unable to delete the existing repository within TFS collection.
This action is performed in visual studio command (not sure why a simple gui is provided for this!) and command name is tf destroy.
Command takes a parameter which is basically the source.
sample:
>tf destroy $”/Testcode/QA1″
If there are multiple collections configured within TFS, this command will through out an error message “Unable to determine the source control server”.
The resolution is simple – provide the server being used (with input /s:<servername>)
>tf destroy $”/Testcode/QA1″ /s:”http://<server>/tfs/<collection>“
When server name is provided TF will use this in order to make appropriate call to destroy the appropriate content.
Few more command which comes in handy:
>tf workspaces => lists down all the existing workspace configurations
>tf destroy /preview $”/Testcode/QA1″ /s:”http://<server>/tfs/<collection>“ => this helps in previewing the content which is about to get deleted
Failure trying to synch web application
We had to rebuild our SharePoint environment as part of VM migration. After moving the old content database to new VM SharePoint server and attaching the same, we started seeing logging of error every hour. It relates to a database that was renamed and thus disassociate with its original web application, then reassociated with new one using stsadm -addcontentdb method.
- There are 2 ways to go about in resolving this issue.
Within the table – Sitesynch in Sharedservices database, I foun out that the database id in this do not match with the database id from the config database of the SharePoint. Site ID seems to be ok in this table though. After deleting the rows from this tabase, the errors went away and this table was repopulated back (during next timer job run) correct sites. - I found that you can actually run this stsadm command which helps in resolving this issue and is a better way since this is a command provided by Microsoft.
Here are the details for the second option.
Run the command mentioned below. The value you are passing is how many days old the record are. Just a side note, you are deleting the records that are associated and NOT the database itself.
stsadm -o sync -deleteolddatabases 0
Deleted sync information for DB 36428ec4-00ab-4140-861f-05510dfef27b
Deleted sync information for DB 08f30507-8b24-4cf1-9b9f-1d0464002d57
Deleted sync information for DB 70d0a080-e864-451f-ac9e-9c7047038350
Deleted sync information for DB e6da9e0f-1093-450a-9521-d2e61122b71b
The below command lists all the old databases, which should return 0 rows since the old database entries are deleted using our earlier command.
stsadm –o sync –ListOldDatabases 5
Date Time problem with Date datatype in SharePoint
Have you noticed that When trying to SharePoint metadata column which use a Date/Time list column, the content in database is stored with 12:00:00AM added along with the date, even if the the column was specified as date only.
Solution: Use another column of type Calculated column of type “Single Line of text” and use the below mentioned formula.
=MONTH([This is My Date Col])&”/”&DAY([This is My Date Col])&”/”&YEAR([This is My Date Col])
Isn’t that easy ?
What happens when web.config is updated ?
I have had situations where I had to edit the web.config file on a live SharePoint environment. So, what happens if I go ahead and perform the config update ? Questions which ponder are,
- Will this kick off IIS worker process to recycle ?
- Will active users lose their session state ?
- What’s the user experience when web.config is updated and user is finishing up modifying a SharePoint list item ?
Without any doubt, here are the actions -
- The application pool will be reset and thus users lose their session state.
- Because of this action, the next set of page requests will be slower (as cached resources are not there anymore)
- This action is something similar to updating a document and reopening in desktop
Its always advised to backup the manually edited web.config and ofcourse other updated files too.
Sharepoint generated emails are going to Junk email folder
There were couple of email notifications being sent out from custom workflows (created using SharePoint designer). All the users were getting these emails into their junk email folder. Since this is a corporate email, the emails should have got into inbox instead of junk email folder.
Couple of things I had checked:
- Checked junk email settings in outlook and tested by setting it to low
- Updated all patches & service packs related to outlook
All these items didn’t stop emails from going to junk email folder.
Once email suffix was added to safe senders list, it started working fine, but exchange admin team aren’t willing to have this arrangement as the email address belongs to same domain.
Checked with Exchange folks to see if SCL ranking in the message is low and being classified for as junk e-mail. The SharePoint server should be in a network that’s excluded from processing by the anti-spam agents.
SQL Server – Invalid column error
I was attempting to create a Stored Procedure for a newly created database. However the Sql Server Management Studio intellisense does not recognize more than half of the tables which have been created.
For example whilst in the left hand column under tables I have a table dbo.DocumentLib, when I type “dbo.” in the new query window, that table is not listed, in fact only 17 out of 37 tables are listed. I can see no difference between the tables listed by intellisense and those not. If I manually type dbo.DocumentLib, it is underlined, with an error of “Invalid Object Name ‘dbo.DocumentLib’.”.
Have I missed something in setting up the tables?
UPDATE: I have tried refresh of the tables list (several times)
Solution – 1: Try refreshing the table view in the Object Explorer. This can be done by right clicking the “tables” folder and pressing the F5 key.
Solution – 2: Try the following sequence:
Edit -> IntelliSense -> Refresh Local Cache
This should refresh the data cached by Intellisense to provide type-ahead support and pre-execution error detection.
Also, ctrl+shift+r refreshes intellisense in management studio 2008 as well.
Alerts in SharePoint (Troubleshooting MOSS/WSS)
Recently I came across this blog post which looks to be nicely organized.
Here’s the URL: http://blogs.technet.com/b/steve_chen/archive/2009/11/20/alerts-in-sharepoint-troubleshooting-moss-wss.aspx