Friday, November 09, 2012

PDF Icon not showing in SharePoint 2010 Document Library

Follow the steps below to resolve the issue of PDF icon not showing up in Document Libraries in SharePoint 2010:

1) Download icon - http://www.adobe.com/images/pdficon_small.gif and copy to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES

2) Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML - Open the file "DOCICON.XML" in notepad

3) Enter a Mapping key <Mapping Key="pdf" Value="pdficon_small.gif" /> right above the </ByExtension> tag. Save the file and exit

4) Perform iisreset /noforce

5) Do the above steps in each SharePoint server in your farm.

Sunday, November 04, 2012

Change your default Windows 8 Enterprise Product Key

Step 1 - Launch cmd.exe in Administrator mode (right click on cmd.exe and select "Run as Administrator")

Step 2 - In the command window type slui.exe 3

Step 3 - In the new Window that pops up, enter your new licensed Windows 8 Enterprise Product Key

If you purchased a downloaded a licensed version of Windows Enterprise using your MSDN licensing then this option will work and your Windows will be activated and ready for use

ENJOY the most powerful OS built by Microsoft ever!

Thursday, May 31, 2012

Unable to see the Drag and Drop Multiple File Upload control in SharePoint 2010

Ever came across this annoying and mysterious issue on how the SharePoint 2007/2010 Multiple file upload control shows either "Drag and Drop" screen or a flat "checkbox screen where you can only bulk upload from a single folder" - If answer is YES then read on to solve the issue for good in terms of how to always see the "Drag and Drop" screen for multiple file upload.

Ensure that you are unable to see the Drag and Drop feature when you click on "Upload Multiple  Files" in SharePoint. If you dont then take the following steps to resolve:
1) If you are using IE Browser, Click on Tools > Manage Add-ons and validate this add-on version "STSUpld.UploadCtl" - it it says 12.0.... then its the older version as it should say 14.0... You have found your PROBLEM!
2) To Resolve Step 1 version issue, Open Add/Remove Programs and Click on Microsoft SharePoint Designer 2010 and select "Change" option. When wizard opens up then select "Repair" option and let the Microsoft Wizard do the trick for you. Let the Repair process finish.
3) Close all browsers down and now launch IE and goto your favourite SharePoint document library when you want to upload multiple files and VOILA! - You should see the Multiple File Upload control show the Drag and Drop Wizard

NOTE - If you note in Step 1 that you cannot find the Add-on OR in Step 2 where your client computer does not have Microsoft SharePoint Designer 2010, then I recommend you do the following:
1) Free download and install Microsoft SharePoint Designer 2010 (64-bit here / 32-bit here)
2) Free download and install Microsoft Silverlight
3) Free download and upgrade browser to IE 9.0 (recommended only not mandatory)

Sunday, March 18, 2012

How to Resolve BCS (SharePoint 2010) Error "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON"

Here are the steps to resolve BCS (SharePoint 2010) Error "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON":
1) Open Powershell (Run as Administrator) and type the following lines:

$bdc = Get-SPServiceApplication | where {$_ -match "Business Data Connectivity Services"}
$bdc.RevertToSelfAllowed = $true
$bdc.Update();

NOTE - That your BCS Service Application should match the name as above. Else change it to what your BCS Service application is called (the way you find out is by going to Central Admin > Application Management > Manage Service Applications (and look for BCS Service App name)

Once above is done, Open the External Content Type in SharePoint Designer 2010 and Click on Edit Connection Properties:



Once the Edit Connection Properties dialog opens, ensure that you have selected the "BDC Identity" value for the Authentication Mode property


Go Back to the ECT Read screen in your SharePoint site and hold your Ctrl key and click the refresh button on your browser. EUREKA! The error "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON" should now get resolved and you should see results displayed from yor LoB

Monday, January 30, 2012

Annoying DOTNETNUKE 5.x or 6.x version ISSUE - Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

I was running a DNN app on my local machine. I have now moved it to my server and am trying to get it working.

Note that I am using Godaddy hosting

ERROR IS AS FOLLOWS:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1953274
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849707
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +74
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +93
Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues) +87
DotNetNuke.Data.SqlDataProvider.UpdateServerActivity(String ServerName, String IISAppName, DateTime CreatedDate, DateTime LastActivityDate) +192
DotNetNuke.Entities.Host.ServerController.UpdateServerActivity(ServerInfo server) +76
DotNetNuke.Common.Initialize.InitializeApp(HttpApplication app) +474
DotNetNuke.Common.Initialize.Init(HttpApplication app) +145
DotNetNuke.HttpModules.RequestFilter.RequestFilterModule.FilterRequest(Object sender, EventArgs e) +187
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

ISSUE FIX IS AS FOLLOWS:
Goto SQL Server, Find the Stored Procedure called "UpdateServerActivity" and alter it as follows (change highlighted in RED):


ALTER PROCEDURE dbo.UpdateServerActivity
    @ServerName   nvarchar(50),
    @IISAppName   nvarchar(200),
    @CreatedDate  datetime,
    @LastActivityDate datetime
AS
 DECLARE @ServerID int
 -- SET @ServerID = (SELECT ServerID FROM dbo.WebServers WHERE ServerName = @ServerName AND IISAppName = @IISAppName)
 SET @ServerID = (SELECT Top 1 ServerID FROM dbo.WebServers WHERE ServerName = @ServerName AND IISAppName = @IISAppName order by LastActivityDate DESC)

 IF @ServerID IS NULL
  BEGIN
   -- Insert
   INSERT INTO dbo.WebServers (
    ServerName,
    IISAppName,
    CreatedDate,
    LastActivityDate,
    [Enabled]
   )
   VALUES (
    @ServerName,
    @IISAppName,
    @CreatedDate,
    @LastActivityDate,
    0
   )
  END
 ELSE
  BEGIN
   -- Update
   UPDATE dbo.WebServers
    SET
     LastActivityDate = @LastActivityDate
    WHERE  ServerName = @ServerName AND IISAppName = @IISAppName
  END

GO

Sunday, January 15, 2012

The server returned a non-specific error when trying to get data from the data source. (SharePoint Designer 2007 error)

If you see this error in SharePoint Designer (click on Data Source and Show Data) then check the following:
1) If any calculated columns are used on corresponding list then make sure that any conditional statements using IF does not use "" in non-string data type fields. For example using IF([IsActive] = 'Yes', '', 'Test') - use of '' should be replaced with empty string if type is number etc
2) Check the SelectCommand within the Data View as well as DataFields and ensure that there are no fields/columns used which does not exist on the corresponding list

Friday, January 06, 2012

EDMX Issue - The version of SQL Server in use does not support datatype ‘datetime2′

Here is how you resolve - Open your EDMX in Notepad or Visual Studio. At the top you will find the storage model and it has an attribute ProviderManifestToken. This has should have the value 2008. and change that to 2005.

Rrecompile and everything should work.