Friday 25 March 2011

These files can't be opened, Windows Server 2008

When trying to install exe on Windows Server 2008, you might see the error These files cant be opened

Your internet security settings prevented one or more files to be opened.

Right click on the file, click on properties and at the bottom of the general tab, you would see a “Unblock” button. If you trust the file you are trying to install, click on the button and click ok.



Then right click on the exe again and select “Run as Administrator”, that should run the program

Installing Visual Studio 2010 on Windows Server 2008 R2 Error


The installation of visual studio 2010 will fail displaying a number of different reasons when trying to install using an ISO mounted drive on Windows Server 2008 R2.
 One possible solution for this if the server has access to the internet is to use the web installer to install visual studio. You will find the corresponding web installers for each of the Visual Studio versions on MSDN. When using a web installer the installation succeeds.







Thursday 17 February 2011

Hide "Home" link in top navigation of SharePoint 2010

Hide the home node in the top navigation menu of SharePoint 2010

 
In SharePoint 2007, if we set the datasource providor value of ShowStartingNode="False", the "home" link used to be hidden but if you try the same setting in SharePoint 2010, it does not work.


ShowStartingNode="False"
SiteMapProvider="Tried CombinedNavSiteMapProvider and SPNavigationProvider"

To fix this, I had to use the PortalSiteMapDataSource which used to exist in Moss 2007. To get it working follow the steps below:

1. Add a register tag to your master page


2. Add a PortalSiteMapDataSource to the master page

(Open Square Bracket) PublishingNavigation:PortalSiteMapDataSource


ID="GlobalNavDataSource"

Runat="server"

SiteMapProvider="CombinedNavSiteMapProvider"

EnableViewState="true"

StartFromCurrentNode="true"

StartingNodeOffset="0"

ShowStartingNode="false"

TreatStartingNodeAsCurrent="true"

TrimNonCurrentTypes="Heading" / (close square bracket)

 
 
3. Update your top navigation to use this data source instead

(Open Square Bracket)
PublishingNavigation:PortalSiteMapDataSource


ID="GlobalNavDataSource"

Runat="server"

SiteMapProvider="CombinedNavSiteMapProvider"

EnableViewState="true"

StartFromCurrentNode="true"

StartingNodeOffset="0"

ShowStartingNode="false"

TreatStartingNodeAsCurrent="true"

TrimNonCurrentTypes="Heading"/(close square bracket)



I have not tested it completly for side effects as I am just trying these things out in 2010. Will update this post if I find any side effects because of this.

Another way of doing this is through CSS...

 .s4-tn li.static > a {


display: none !important;

}

.s4-tn li.static > ul a {

display: block !important;

}












Wednesday 26 January 2011

TFS keeps file checked out after successful check in

Some people might experience that on checking in a file into TFS, the file is actually checked into source control but the “checked out” icon appears in visual studio.

This is because of a visual studio settings, to change this follow these instructions.

1. Open visual studio

2. Navigate to Tools - Options and under the “Source Control” - "Environment" - untick the check box that says "Keep items checked out when checking in"
That's it!