Slow user authentication using TeamFoundationServerFactory
I'm writing a time registration web project where users are able to write time related to TFS Work Items. This involves searching for a Work Item Id and displaying information about the Work item in the web, e.g. description.
This project is working properly but I'm getting complaints about the website being slow when user is accessing TFS for the first time.
I'm using Kerberos to send the user credentials over to the TFS server for authentication using the following code:
TeamFoundationServerFactory.GetServer(url); _tfs.EnsureAuthenticated(); //Authenticates only if neccessary
This takes about 10 seconds for the first time, but after that it's working OK. Is there anything I can do to optimize this ?