Monday, December 14, 2015

.NET Framework 3.5 feature + Specify an alternate source path

.NET Framework 3.5 feature + Specify an alternate source path error for SharePoint prerequisite installation error.




Try to install the following Windows update and it may fix your issues.

https://support.microsoft.com/en-us/kb/3002547

in come prompt try to enable.

open cmd window as Administrator and run the following command.
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All 

If still fails, try installing Powershell enable powershell and than add this feature. It will work.

Thursday, May 07, 2015

Embrassing screen sharing interview : SharePoint

First time in 10 years I am attending new format of interview. Sharing your computer screen and writing code as per interviewer request.

For me to be frank, interviewer was really a good guy, Nicely spoken most understanding. But I am very nervous about exams right from childhood :)

This interview format is too much for me :) My interviewer was asked me to do very simple stuff write a c# code using SharePoint object model to set values in Choice field. Damn, I know the 5 lines of code. I don't know what happened at that time by I am totally blank :( It was so embarrassing for me and I cannot deliver what he asked. I don't know how to prove I am so much better than this. :(

This blog, I am writing after 1 hr of the interview. The code blow is the what is expected. Hope the code will compile I guess.


//get choice field instance

SPFieldChoice LeaveReason = (SPFieldChoice)myList.Fields["Reason"];

//set field format type

LeaveReason.EditFormat = SPChoiceFormatType.Dropdown;

//set the choice strings

LeaveReason.Choices.Add("Sick");
LeaveReason.Choices.Add("Long Service");
LeaveReason.Choices.Add("Casual");

//update the field

LeaveReason.Update();



//update list

myList.Update();

 
I am still cannot understand why I am this bad in interviews.

Sunday, April 19, 2015

Service Token Failure In SharePoint 2013 Farm

Service Token Failure


--





cls
 
 
# This command loads the Microsoft.SharePoint.PowerShell DLL.

# This DLL is required if you are using Windows PowerShell.
 
 
[string]$Snapin="Microsoft.SharePoint.PowerShell"

if ((Get-PSSnapin $Snapin -ErrorAction SilentlyContinue) -eq $null)



{
 
Write-Host "Loading Snapin: $Snapin";

Add-PSSnapin $Snapin



}
 
else
 
 
{
 
Write-Host "Snapin already loaded: $Snapin";



}
 
$h = Get-SPServiceHostconfig




 
$h.Provision()




 
$services = Get-SPServiceApplication




 
foreach ($service in $services) { $service.provision();

write-host $service.name}



Monday, March 09, 2015

STSADM Cmds for Cancel and redeploy Farm Solution


STSADM Cmds for Cancel and redeploy Farm Solution

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN>
stsadm -o execadmsvcjobs
 
stsadm -o enumdeployments
 
stsadm -o canceldeployment -id
 
stsadm -o deletesolution -name .wsp -override

Start Central Administration Via PowerShell

Start the Central Administration via PowerShell

To list the Central Admin list in Farm

Get-SPServiceInstance | Where-Object {$_.TypeName –eq ‘Central Administration’}


 following code will start the Central Admin if its not started, if its started and online already it will show you a warning message.

cls
# This command loads the Microsoft.SharePoint.PowerShell DLL.
# This DLL is required if you are using Windows PowerShell.
[string]$Snapin="Microsoft.SharePoint.PowerShell"
if ((Get-PSSnapin $Snapin -ErrorAction SilentlyContinue) -eq $null)
{
Write-Host "Loading Snapin: $Snapin";
Add-PSSnapin $Snapin
}
else
{
Write-Host "Snapin already loaded: $Snapin";
}

Get-SPServiceInstance | Where-Object {$_.TypeName –eq ‘Central Administration’} | Start-SPServiceInstance

Hope this helps.  

Friday, July 11, 2014

'Form' is an ambiguous reference between 'System.Windows.Forms.Form' and 'Microsoft.SharePoint.Client.Form'

When I try to use the SharePoint 2013 Client Object model in Windows Application I was getting the following error.

"'Form' is an ambiguous reference between 'System.Windows.Forms.Form' and 'Microsoft.SharePoint.Client.Form'"

Reason is there is a conflict between ‘System.Windows.Forms.Form’ and ‘Microsoft.SharePoint.Client.Form’

Solution:
Just after  changing the code

To

public partial class MainForm : System.Windows.Forms.Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

From 

public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

Problem fixed. 

Monday, June 23, 2014

Windows Phone Emulator is unable to create the virtual machine:

Windows Phone Emulator is unable to create the virtual machine:

Couldn't change Processor of the virtual machine: 'Emulator 8.1 720P 4.7 inch....' failed to modify device 'Processor'. (Virtual machine ID {GUID})

Cannot assign the specified number of processors for virtual machine 'Emulator 8.1 720P 4.7 inch....' is out of range. The range is 1 through 1. (Virtual machine ID GUID)


Solution:

For VMWare, - click on the Edit Virtual Machine Settings and Change the Processor from 1 to more.


Wednesday, May 21, 2014

Restoration of the configuration database by using the built-in backup and restore functionality is not supported in SharePoint products

After having a technical discussion with on the client, I came to notice the key aspect of SharePoint Config DB. Thanks SW :)

I never noticed this specific characteristics of Config DB

We do not support restoration of the configuration database in SharePoint products using the built in backup and restore functionality.

If you restore the configuration database, data in the configuration database will not be synchronized with data in other SharePoint databases. If this data is not synchronized, users may experience various random errors.

For example, a Windows SharePoint Services 3.0 content database may contain data about a newer site. If the configuration database does not contain information about this site, the site is orphaned.

http://support.microsoft.com/kb/948725/en-us

happy learning... 
Google