So my previous configuration was this:

  • TFS 2010, running on the same machine with a WSS 3.0
  • SCVMM on the same machine
  • SQL Server 2008 R2 databases on the same machine

Almost everything was running smoothly, except for some people-picker issues that I had on the team project site permission page.

Anyway, I decided to upgrade the TFS server to TFS2012. In order to do that, I first backed-up everything, both using the backup utility that comes along with TFS and also using a mirorring RAID configuration. I did an in-place upgrade for TFS. After upgrading it, everything worked fine. However, since I didn’t like to look and feel of WSS 3.0 sites, I decided to do an in-place upgrade of SharePoint as well, and I upgraded to SharePoint Foundation 2010.

In-place upgrade worked like a charm, except for the fact that I had to manually install a prerequisite because it wouldn’t download it from the web for some perculiar reason. Once the installation was complete, I came across my first error with SharePoint 2010 Foundation, namely a very generic “server error: <help link>”. Unfortunately the help link only suggested I download the updates, so I downloaded and installed SharePoint Foundation 2010 SP1. After installing it, SharePoint services worked, but TFS no longer worked. I found out that the prerequisites installed actually installed .NET Framework 4 as well and that the applicationHost.config file was updated to use specific assemblies from .NET Framework 4 as well. Unfortunately, one of the updated entries from the applicationHost.config file was not correctly updated, meaning that the runtinme version was not mentioned to be v2.0, thus the runtime it was running on was 4.0. I had to manually correct the applicationHost.config file. Afterwards, everything worked like a charm.

This was just a short introduction of some of the problems I ran across when I updated my TFS. Today I came across another strange thing. When I create a new project collection, I apparently cannot create any SharePoint site for the project collection, and thus for any team project. Specifically, I get the following error when I create the project collection: “tf252005: Configuration of SharePoint Products failed with the following error: Server was unable to process request. —> Cannot retrieve the information for application credential key..”

Moreover, I realized that I cannot change any site collection administrators in SharePoint Central Administration either, having returned this error: “No Results matching your search were found.” (which apparently is quite common to SharePoint users).

The things you would want to check out are:

  • check if the TFSService account (whichever that is) is a farm administrator as well
  • check whether the service accounts are domain accounts, rather than local accounts
  • check whether the application pool credentials the TFS’s site collection and Central Administration run under are set to a domain account
  • check if SharePoint 2010 has set an app password (use the stsadm -o setapppassword -password [yourpasswordhere] command)
  • check if SharePoint 2010 Central Administration is configured to search the correct AD forest(s) (use the stsadm -o setproperty -pn peoplepicker-searchadforests -pv “[yourdomain],[yourusername],[yourpassword]” -url http://[yoursharepointserver] command)

I found that the solution for me was to configure the app password. Using peoplepicker-searchadforests command without running the setapppassword command returned this error “Cannot retrieve the information for application credential key”. Moreover, keep in mind to run the setapppassword command on all front web servers before doing anything else, and also keep in mind to use the same password on all front web servers.

There’s a lot to say in very short time:

  1. Attended Build 2012 in Redmond! Awesome!!! I really have to tell you more about how well MS organizes such events!
  2. Passed the Professional Scrum Master I assesment! Here comes # 2!
  3. Passes 70-483 exam from Microsoft. And if you’re wondering, the answer is no. They didn’t publish the preparation materials yet, nor the self-paced training kits nor anything! And for the sake of writing some more stuff here, of course I didn’t study for a minute for this exam, since I took it while attending Build 2012 :)
  4. Last but definittely not least, I got married too!

As for Build 2012, I had the chance to talk to Mark Russinovich, the guy responsible for Sysinternals and one of the guys on the Azure team (for two years already), who had an extraordinary talk on the internal stuff regarding Windows Azure, with Scott Guthrie, the Microsoft corporate VP for the Developer Division who had some great talks on Windows Azure and with lots and lots of developers on the Microsoft campus about Windows 8 (regarding Store apps, ReFS, power management etc.), Azure Storage, SQL Databases on Windows Azure, VS 2012 and also to some MS Parterners.

I absolutely loved the conference and I’m definittely willing to tell you more about it, if you want! Just contact me and we’ll gradly chat about it!

BR,

Alex

WP_20121101_014[1]

Lab Management is a great piece of software that takes great use of virtual machines in order to create virtual labs where you, your team and your testers can test out an application in a clean environment. Lab Management integrates with Team Foundation Server 2010 and thus enables you to create the lab environements out of Visual Studio with ease.

So I started upgrading our TFS 2008 with the not-so-brand-new TFS 2010, on a completely different new machine. Besides the hassle regarding upgrading the databases, prepairing the user accounts, the shared folders, the services etc. I got to the point where I had everything working (except SharePoint Services 3 integration; will talk about that later) and was getting ready to install the Lab Management stuff.

Before starting of with the real subject of this post, let me tell you, in short, the environment topology: Active Direcotory with several domain controllers running WS2003, one WS2008R2 machine running two instanced of SQL Server 2008 R2 (one for TFS 2010, one for SCVMM 2008 R2 –> it is important not to use the first instance for SCVMM), System Center Virtual Machine Manager 2008 R2, Team Foundation Server 2010 and SharePoint Services 3. Also, for running SCVMM that machine has the Hyper-V role activated.

First things are first, so I installed the Hyper-V role on my Windows Server 2008 R2 machine and afterwars System Center Virtual Machine Manager 2008 R2, because Lab Management works with SCVMM. After putting everything up and creating the SCVMM configuration to work with Hyper-V, I got the the final (and, in the end, not so final after all) point where I would configure the Lab Management in Team Foundation Server Admin Console.

So I put in the machine’s fully qualified domain name and click Test, but then suddenty a dialog box pops up requesting a user account. So I enter the user account I created for the Lab Management stuff (TFSLAB), insert the password and click Test. The credentials are fine, so I click Ok. Boom! I get this error:

TF260078: Team Foundation Server could not connect to the System Center Virtual Machine Manager Server: servername. More information for administrator: You cannot contact the Virtual Machine Manager server. The credentials provided have insufficient privileges on servername.

Ensure that your account has access to the Virtual Machine Manager server on servername, and then try the operation again.

Right. Now what? I double-check the password. Password’s fine. I double-check the username. Username’s fine. Obsiously this doesn’t have anything to do with the credentials. I check the Configuring Lab Management for the First TIme article on MSDN (here). Scroll down the site, and come across a Troubleshooting link. Click the link and come across a short text that basically tells me to check some blog or the forums. Check the blog. Nothing there about 260078. Check the forums. No similar error.

Obsiously, I’m special! Search the Web some more. After about an hour or so, I decide to post in the MSDN forums: maybe a wise man does have an answer after all. Post the error in the forum. Wait for two hours. I’m notified on my phone that someone has replied to my post. Don’t really have the time to check the post in that moment, so I’ll leave it for a couple of minutes, but than another notification alerts me! Surely I must have found gold! Two replies one after the other? Problem is as good as solved. Check the thread and find out only that someone else if trying to figure out the same thing.

Ok, enough with the introductory chit-chat.

What I did:

1. (don’t really know if it helps, or not, but this was required for similar errors) Added TFSLAB (and eventually TFSSERVICE – the account Team Foundation Service runs under) to these AD groups Pre-Windows 2000 Compatible Accessand Windows Authorization Access Group.

I tried running the Lab Configuration again, but still no luck.

2. Changed the accounts the Virtual Machine Manager and SQL Server (this is absolutely required) and Virtual Machine Agent run under to the TFSLAB account. Restart the services, but Virtual Machine Agent doesn’t start. The Service Manager posts some extremely generic error message (The Virtual Machine Manager Agent service terminated with service-specific error %%-2147217405.), so I check the Event Viewer and find this: The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {9C38ED61-D565-4728-AEEE-C80952F0ECDE} and APPID {5364ED0E-493F-4B16-9DBF-AE486CF22660} to the user domaintfslab SID (S-1-5-21-1004336348-790525478-1801674531-15332) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.

As the message suggest, VMM Agent cannot start because of a component. My suspicion is that TFSLAB doesn’t have priviledges to that component, so I immediately open Component Services. However, the components are only listed by their friendly name, so I open the registry editor in order to find the component’s friendly name: Virtual Disk Service Loader. Sounds promising. I go back to Component Services, search for Virtual Disk Service Loader, right-click it in order to configure the security permission and find that everything is grayed out, as it were disabled. I check whether DCOM is enabled (right-click on the computer in the Component Services list) and find that it is.

Search online books some more and find that for Windows Server 2008 R2 Microsoft, for some “security” reason decided that Administrators, no matter their level of godness, are no longer permitted to configure anything in the Component Services and instead, a user called TrustedInstaller has acces (not even the godlike SYSTEM accound is no longer permitted acces there –> WHY?!).

Some article on the Web stated that going back to registry editor, back to HKEY_CURRENT_ROOTCLSIDidHere, clicking on the permissions option in the CLSID’s context menu (replace CLSID with that long ID your’s looking for 9C38…) and configuring the FULL CONTROL permission for the Administrator should solve the problem. However, it didn’t. What I did though (as a temporary resort, because it was getting frustrating) was to add the TFSLAB account to the local admin accounts group.

So, in conclusion:

  • add the TFSLAB account to the local admins
  • add TFSLAB to the AD built-in groups I mentioned earlier
  • run SQL Server instance service with the TFSLAB account
  • run the VMM service with the TFSLAB account

and you should have everything up and running (after finishing the configuration, of course).

Till next time,

A

Today I just found out a lot of interesting shortcuts I wish I knew years ago!

For example, did you know that if you keep the control key (Ctrl) down and press the + key (it has to be the + key, not the combo += key close to the backspace key; if you don’t have a numeric keypad, you could first lock the numberpad on a laptop keyboard and then use the + key), Windows automatically resizes all your columns in a column-ish UI (such as Task Manager). There you go! 15 years of computing!

One other cool thing I found out today was that Windows allows you to balance between the open apps + windows. So if you Alt+Tab in Windows, you only scroll between the open apps. And if you Ctrl+Tab, you scroll around the open views/windows inside an app. But if you hold down the Ctrl key and click the Left-button of the mouse, you can scroll between all the views open in the application group that the mouse curso if over. You have to try this! I absolutely love it!

One more cool thing I had no idea about: if you hold down the Ctrl key when you click the New Task menu option in Task Manger, you automatically get an command prompt opened! How cool is that?

Hope you’ll find this shortcuts as usefull as I do!

Happy Easter!

I was talking today to another follower of the OradeaDevs Facebook page (oradeadevs@groups.facebook.com) about querying data on a specific set, based on whatever column, e.g. Name.

Considering a Product table which has the following columns IDProduct, ProductName, one would probably try to query the set-data by using something we call a sub-query select (or sometimes inner select). Even though the expected result is correct, in my opinion it is best to stay away from any kind of sub-queries, because these are usually the reason for why SQL databases respond slow (after the use of cursors, of course). Keep in mind that even if you’re Chuck Norris and do some sort of magic indexes configuration, once the SQL query engine will scan the clustered/non-clustered index tables, spool the tables over and over again, remove the carthesian products resulted from the subquery values etc. the query result will respond slow.

In my opinion, it is best have a larger set of the data kept in a buffer memory-like area and query the last set from there. For example, if one would like to query the entries, ordered alphabetically by their name, from 21 to 30, it would be a better solution to query the data from 1 to 30 and afterwards to query the last 9 values (which is bassically the case of using a simple WHERE clause).

And since it comes to temporary data tables, considering SQL Server 2K5 is around for some time now, I would suggest the use of common table expressions, which are a great way, from the performant p.o.v., to save your temporary data you want to query on.

So, there the use of a CTE which lists the entries between 29989 and 30000 of a table called Product, ordered by their product name:

WITH TopCTE AS (     SELECT TOP 30000        ROW_NUMBER() OVER(ORDER BY ProductName) AS RowNumber, ProductName        FROM Product        ORDER BY ProductName ) SELECT *     FROM TopCTE     WHERE RowNumber > 29990

That’s it for now!

BBL 🙂

Hey guys! First of all, thanks a lot for checking my blog out!

Sorry for not posting for such a long time now! I suppose the Live Spaced-Wordpress transition kind of killed it for me! I’m extremely glad I had 4 unapproved comments and I approved them all at once! I will try and do my best in posting new things from now on on a regular basis! I promise I’ll do my best!

So, in conclusion, thanks again for your comments and for following my blog!

See you soon, in another comment 🙂

Alex

Today I’ve discovered that I’m denied access to several folders in Windows 7. Now, you might be thinking ‘Did you try running Explorer with Administrative privileges?’. Of course I have!

The list of folders that I was denied access to is the following:

 

  • Access to the path ‘C:Documents and Settings’ is denied.
  • Access to the path ‘C:ProgramDataApplication Data’ is denied.
  • Access to the path ‘C:ProgramDataDesktop’ is denied.
  • Access to the path ‘C:ProgramDataDocuments’ is denied.
  • Access to the path ‘C:ProgramDataFavorites’ is denied.
  • Access to the path ‘C:ProgramDataMicrosoftWwanSvcProfiles’ is denied.
  • Access to the path ‘C:ProgramDataStart Menu’ is denied.
  • Access to the path ‘C:ProgramDataTemplates’ is denied.
  • Access to the path ‘C:RRbackups’ is denied.
  • Access to the path ‘C:System Volume Information’ is denied.
  • Access to the path ‘C:Users<username>AppDataLocalApplication Data’ is denied.
  • Access to the path ‘C:Users<username>AppDataLocalHistory’ is denied.
  • Access to the path ‘C:Users<username>AppDataLocalTemporary Internet Files’ is denied.
  • Access to the path ‘C:Users<username>Application Data’ is denied.
  • Access to the path ‘C:Users<username>Cookies’ is denied.
  • Access to the path ‘C:Users<username>DocumentsMy Music’ is denied.
  • Access to the path ‘C:Users<username>DocumentsMy Pictures’ is denied.
  • Access to the path ‘C:Users<username>DocumentsMy Videos’ is denied.
  • Access to the path ‘C:Users<username>Local Settings’ is denied.
  • Access to the path ‘C:Users<username>My Documents’ is denied.
  • Access to the path ‘C:Users<username>NetHood’ is denied.
  • Access to the path ‘C:Users<username>PrintHood’ is denied.
  • Access to the path ‘C:Users<username>Recent’ is denied.
  • Access to the path ‘C:Users<username>SendTo’ is denied.
  • Access to the path ‘C:Users<username>Start Menu’ is denied.
  • Access to the path ‘C:Users<username>Templates’ is denied.
  • Access to the path ‘C:UsersAll UsersApplication Data’ is denied.
  • Access to the path ‘C:UsersAll UsersDesktop’ is denied.
  • Access to the path ‘C:UsersAll UsersDocuments’ is denied.
  • Access to the path ‘C:UsersAll UsersFavorites’ is denied.
  • Access to the path ‘C:UsersAll UsersMicrosoftWwanSvcProfiles’ is denied.
  • Access to the path ‘C:UsersAll UsersStart Menu’ is denied.
  • Access to the path ‘C:UsersAll UsersTemplates’ is denied.
  • Access to the path ‘C:UsersDefaultAppDataLocalApplication Data’ is denied.
  • Access to the path ‘C:UsersDefaultAppDataLocalHistory’ is denied.
  • Access to the path ‘C:UsersDefaultAppDataLocalTemporary Internet Files’ is denied.
  • Access to the path ‘C:UsersDefaultApplication Data’ is denied.
  • Access to the path ‘C:UsersDefaultCookies’ is denied.
  • Access to the path ‘C:UsersDefaultDocumentsMy Music’ is denied.
  • Access to the path ‘C:UsersDefaultDocumentsMy Pictures’ is denied.
  • Access to the path ‘C:UsersDefaultDocumentsMy Videos’ is denied.
  • Access to the path ‘C:UsersDefaultLocal Settings’ is denied.
  • Access to the path ‘C:UsersDefaultMy Documents’ is denied.
  • Access to the path ‘C:UsersDefaultNetHood’ is denied.
  • Access to the path ‘C:UsersDefaultPrintHood’ is denied.
  • Access to the path ‘C:UsersDefaultRecent’ is denied.
  • Access to the path ‘C:UsersDefaultSendTo’ is denied.
  • Access to the path ‘C:UsersDefaultStart Menu’ is denied.
  • Access to the path ‘C:UsersDefaultTemplates’ is denied.
  • Access to the path ‘C:UsersDefault User’ is denied.
  • Access to the path ‘C:UsersPublicDocumentsMy Music’ is denied.
  • Access to the path ‘C:UsersPublicDocumentsMy Pictures’ is denied.
  • Access to the path ‘C:UsersPublicDocumentsMy Videos’ is denied.
  • Access to the path ‘C:WindowsRegistrationCRMLog’ is denied.
  • Access to the path ‘C:WindowsSystem32comdmp’ is denied.
  • Access to the path ‘C:WindowsSystem32configsystemprofileAppDataLocalApplication Data’ is denied.
  • Access to the path ‘C:WindowsSystem32configsystemprofileAppDataLocalHistory’ is denied.
  • Access to the path ‘C:WindowsSystem32configsystemprofileAppDataLocalTemporary Internet Files’ is denied.
  • Access to the path ‘C:WindowsSystem32configsystemprofileApplication Data’ is denied.
  • Access to the path ‘C:WindowsSystem32configsystemprofileCookies’ is denied.
  • Access to the path ‘C:WindowsSystem32configsystemprofileLocal Settings’ is denied.
  • Could not find a part of the path ‘C:WindowsSystem32configsystemprofileSendTo’.
  • Access to the path ‘C:WindowsSystem32LogFilesWMIRtBackup’ is denied.
  • Access to the path ‘C:WindowsSysWOW64comdmp’ is denied.
  • Access to the path ‘C:WindowsSysWOW64configsystemprofileAppDataLocalApplication Data’ is denied.
  • Access to the path ‘C:WindowsSysWOW64configsystemprofileAppDataLocalHistory’ is denied.
  • Access to the path ‘C:WindowsSysWOW64configsystemprofileAppDataLocalTemporary Internet Files’ is denied.
  • Access to the path ‘C:WindowsSysWOW64configsystemprofileApplication Data’ is denied.
  • Access to the path ‘C:WindowsSysWOW64configsystemprofileCookies’ is denied.
  • Access to the path ‘C:WindowsSysWOW64configsystemprofileLocal Settings’ is denied.
  • Could not find a part of the path ‘C:WindowsSysWOW64configsystemprofileSendTo’.

As you’ve probably already figured it out, the list contains also the special folders from the 64bit environment that aren’t accessible.

The thing is, as it appears, that these aren’t actual folders, but so-called junction points, created to offer backward compatibility with other operating systems (Vista, XP…).

Now, if you might have been able to see them in Vista (as shortcuts), and access them (which would have redirected you to the actual folders), there is a small glitch in Seven: you don’t see them, not even as shortcuts, and if you try to manually insert these folder paths and open them, instead of being redirected to the actual folders, you’ll get an error saying that access is denied. Honestly, I would have liked to get an ‘path does not exist’ or something similar.

So, how did I get this list? Well, I ran a folder-listing application I’ve written in .NET Framework, and the GetDirectories() method returned these folders as sub-folders of their parents (sounds fishy :)).

So here’s the thing with backward compatibility:

  1. you have an app that does some IO ops in the special environment folders
  2. the .NET Framework returns these special folders as existing
  3. you run your app with elevated privileges to make sure no errors occur
  4. boom, you get an access denied error on some special folders that don’t actually exist.

Is it just me, or is there a glitch somewhere?

P.S.: more about junction poins here: http://www.svrops.com/svrops/articles/jpoints.htm