Wednesday, March 12, 2014

Microsoft Certified Professional in SharePoint 2013

Last Monday (11th March, 2014) I have passed 70-488 "Developing Microsoft SharePoint Server 2013 Core Solutions" Exam.

Now I am moving forward for become MCSD: SharePoint Applications Solutions Developer. 
 
Happy SharePointing...!!!

Monday, September 2, 2013

401 Unauthorized errors on SharePoint 2013

In my SharePoint 2013 development environment I found a new issue which was not happened in past, I suddenly ran into 401 unauthorized errors.
Those errors would occur only when the pages would be rendered through the /_layouts/15/start.aspx page. This specific page is responsible for loading pages from a site using the Minimal Download Strategy feature, a new feature in SharePoint 2013 that improves client rendering performance and fluidity for navigating from one page to another page by downloading only the changes between two pages.

Error:
401 unauthorized

Solution:
If you are experiencing those 401 unauthorized errors, simply disable the following feature for now.
Site Settings > Manage Site Features > Minimal Download Strategy (see the image below)




Happy SharePointing...!!!

Friday, June 7, 2013

Error occurred in deployment step 'Recycle IIS Application Pool': The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

Error:
Error occurred in deployment step 'Recycle IIS Application Pool': The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm. (see the image below)



Cause:
Your login user has no 'db_owner' access for SharePoint Databases.
1. SharePoint_Config
2. SharePoint_AdminContent_[XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX]
3.Your web application DB in which you want to deploy WSP (Example. WSS_Content_XXXX)

Solution:
Now connect your SQL Server with admin user.
Then select your user which has error in deployment.
Then assign all above DBs to db_owner rights. (see the image below)





Now try to deploy your WSP.

You can successfully deploy WSP.

Happy SharePointing...!!!

Wednesday, June 5, 2013

Workflow Manager Configuration Wizard Error for SharePoint 2013

Error:  
Method not found: 'System.String Microsoft.ServiceBus.Commands.Common.SecurityHelper.CreateServerAdministratorRole(System.String, System.String)'.

Error Detail Log: 
System.Management.Automation.CmdletInvocationException: Method not found: 'System.String Microsoft.ServiceBus.Commands.Common.SecurityHelper.CreateServerAdministratorRole(System.String, System.String)'. ---> System.MissingMethodException: Method not found: 'System.String Microsoft.ServiceBus.Commands.Common.SecurityHelper.CreateServerAdministratorRole(System.String, System.String)'.
   at Microsoft.ServiceBus.Commands.NewSBFarmBase.InstallManagementDB(String connectionString)
   at Microsoft.ServiceBus.Commands.NewSBFarmBase.ProcessRecordImplementation()
   at Microsoft.ServiceBus.Commands.ServiceBusBaseCmdlet.ProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
   --- End of inner exception stack trace ---
   at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
   at Microsoft.Workflow.Deployment.ConfigWizard.CommandletHelper.InvokePowershell(Command command, Action`3 updateProgress)
   at Microsoft.Workflow.Deployment.ConfigWizard.ProgressPageViewModel.CreateSBFarm(FarmCreationModel model)


Resolution:

Missing Service Bus 1.0 package.
Download from  http://www.microsoft.com/en-in/download/details.aspx?id=35374
OR 
Install http://www.microsoft.com/en-us/download/details.aspx?id=36794

Then re-run Workflow Manager Configuration Wizard again and see the 
first steps working successfully for "Create a new Service Bus farm."




Happy SharePointing...!!!

Tuesday, June 4, 2013

Microsoft Certified Professional

Last saturday (1st June, 2013) I have passed 70-573 "TS: Microsoft SharePoint 2010, Application Development" Exam. 

Now I become Microsoft Certified Professional and moving forward for become MCPD (70-576). 

Happy SharePointing...!!!



Friday, May 10, 2013

All application, file icons change to Acrobat/Reader icon after install Acrobat Reader

Issue:
After I install Adobe Reader on Windows 7 , icons of all applications and file-types change to Acrobat/Reader icon. Double-clicking any icon or file launches Acrobat or Reader. (The native application associated to the file type doesn't open.)

Solution:
I found good solution in Acrobat Help.
See the link here.


Tuesday, March 12, 2013

Get SharePoint Users List from Infopath Form People Editor

Today I am doing some R & D with Infopath form & workflow. I want to pass multiple users from Infopath to workflow for multiple users' task creation.

I have searched on google but not getting proper result for above. That's why I have decided to write this post for other user's help.

See below image for visualization.

 

 








Now, fire button click & add below code.

        public void btnGetUsers_Clicked(object sender, ClickedEventArgs e)
        {
            // Write your code here.
            XPathNodeIterator sentToIterator = MainDataSource.CreateNavigator().Select("/my:myFields/my:reviewersGroup/pc:Person/pc:AccountId", NamespaceManager );
            string result = "";
            int count = 1;
            foreach (XPathNavigator selectedNode in sentToIterator)
            {
                if (count < sentToIterator.Count)
                {
                    result += selectedNode.InnerXml +"; ";
                    count++;
                }
                else
                {
                    result += selectedNode.InnerXml;
                }
            }
        } 
Happy SharePointing...!!!

Saturday, March 2, 2013

The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)

Today I am trying to open my SharePoint port 80 Site in my Laptop which has installed window 7 Ultimate 64 bit OS.

But can't open site in browser so I have checked IIS Manager and seen port 80 site is stopped. So I have tried to start that site but can't start and error fire as below.

Error: The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)  

Cause: After few minutes of research, I have seen one problem. Problem was Skype is by default use port 80 that's why I faced the issue.

Resolution: Go to Skype > Tools > Advance (left side Tab) > Connection > Now unchecked port 80 as per below screen.









Happy SharePointing...!!!

Tuesday, October 16, 2012

SharePoint Foundation 2013 Error : ErrorCode:SubStatus:Service running under Network Service account in workgroup environment is not supported.

Environment: Windows Server 2012, SharePoint Foundation 2013 in Stand-Alone mode

Error: ErrorCode:SubStatus:Service running under Network Service account in workgroup environment is not supported.

Resolution: 
  • Go to Run > Type "Services.msc" 
  • Start "AppFabric Caching Service" with proper login account.
  • Go to SQL Server in then add role to login account as below.
  • Add role: Public, Sysadmin, Setupadmin, Serveradmin
  • Then Go to Run > Type "Cmd" & run as Administrator
  • Set Psconfig.exe path as below command 
  • Type "cd C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN" then click ENTER.
  • Now run command for silent installation "psconfig.exe -cmd Configdb Create SkipRegisterAsDistributedCacheHost"

Happy SharePointing...!!!

Tuesday, July 17, 2012

SharePoint 2013 : Hardware and software requirements

You can check hardware & software requirements on below MSDN Url.
http://technet.microsoft.com/en-us/library/cc262485(v=office.15)  

Happy SharePointing...!!!

Tuesday, May 1, 2012

Access denied. You do not have permission to perform this action or access this resource.

Error:
Access denied. You do not have permission to perform this action or access this resource.

Stack Trace:
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at ConsoleApplication2.Program.getSubWebs(Web orootweb, String path)

Error Code:
clientContext.Load(oWebsite, website => website.Webs, website => website.Title);
clientContext.ExecuteQuery();
 
Error Cause:
There lots of SubSites and some Webs has not permission so when we call  "website => website.Webs" above error file.
 
Error Resolution:
There is one out of the box method for fetch Current User's site (WebCollection result = oWebsite.GetSubwebsForCurrentUser(new SubwebQuery());).
 
Working Code:
WebCollection result = oWebsite.GetSubwebsForCurrentUser(new SubwebQuery());
clientContext.Load(result, n => n.Include(o => o.Title));
clientContext.ExecuteQuery();
 

Happy SharePointing...!!!

Wednesday, April 18, 2012

The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator.

Error:
The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator.

Solution:
1.Open Central Administration
2.Click on Configuration Wizard right hand side navigation links and then Launch the Farm Configuration Wizard.
3.Start the Wizard
4.Make sure checkbox along with State Service is checked.
5.Click Next.
 
 
Happy SharePointing...!!!

Error occurred in deployment step 'Recycle IIS Application Pool'

Error:
Error occurred in deployment step 'Recycle IIS Application Pool': The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.

Solution :
Close you VisualStudio Project & open again.


Happy SharePointing...!!!

Wednesday, March 28, 2012

Error occurred in deployment step 'Activate Features': Unable to locate the workflow's association data.

Error :  "Error occurred in deployment step 'Activate Features': Unable to locate the workflow's association data. To restore the association data to the workflow, restart the workflow settings wizard by selecting the workflow node in Solution Explorer and then clicking the ellipsis button (…) on one of the properties in the Properties window that has an ellipsis button"

Solution : Goto Visual Studio 2010 > Right Click on Workflow file > Property Window  >  Click on any one of (History List/ Target List / Task List ) ...
Then, one popup window will opend and fill required details.

Happy SharePointing...!!!

Thursday, November 17, 2011

The list is too large to save as a template. The size of a template cannot exceed 524288000 bytes.

Error:         The list is too large to save as a template. The size of a template cannot exceed 524288000 bytes. 

Limitation: There is Soft limit for List Template is 50 MB.
                 You can modify using below command :
                 stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 50000000 
                 But this is hard limit to 500MB so we can't save list template more then 500MB size.

Resolution: You can move document using Explorer window but there is also one limitation (can't move metadata) 


Happy SharePointing...!!!

Tuesday, November 15, 2011

SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER

Requirement:  Migrate Data from Access to SQL Server.

So I have to create SSIS Package in SQL Server and I developed on SSIS Package in SQL Server.
All connection managers are fine but when I try to deploy its give me below error.

Error: [OLE DB Source [43]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Access Source Database1" failed with error code 0xC0209303. There may be error messages posted before this with more information on why the AcquireConnection method call failed.


Resolution: Open SSIS Package in Visual Studio > Right Click on Project > Click on Property of your project > Then select "Debugging" node from left side > See the "Run64bitRuntime" property it will be "True" so change it to "False"
Then Deploy again... it will be work...


Happy Migrating...!!!

Thursday, November 10, 2011

Cannot serialize interface System.Collections.Generic.IEnumerable in Web Service

I have faced this problem in one of my project.

I have to create WebMethod that will get some data from CRM 2011 and return that to the client.
My code is return generic types in WebMethods but I couldn't use non-generic IEnumerable as well.
So I have to change this IEnumerable to Array as below.

Older Code which is not working 
[WebMethod]
public List ReadEntityList()
{
     List lstCRMEntity = new List();
     //Write code here
     return lstCRMEntity;
 }
Working code is below
[WebMethod]
public CRMEntity[] ReadEntityList()
{
     List lstCRMEntity = new List();
     //Write code here
     return lstCRMEntity.ToArray();
 }

Happy Coding...!!!

Microsoft SharePoint is not supported with version 4.0.30319.239 of the Microsoft .Net Runtime

SharePoint 2010 does not support access from .NET Framework 4 or being run in a .NET Framework 4 app domain.

Solution :
If you must support the .NET Framework 4, we recommend that you develop a web service that uses the .NET Framework 4 and then connect to it from SharePoint.

Limitation:
All server-side customizations directly for SharePoint 2010 still need to be either the .NET Framework 3.5 or the .NET Framework 3.5 SP1.

You can't directly give the reference of assembly which has run time framework is 4.0.


Happy SharePointing...!!!

Tuesday, October 25, 2011

Using HTTPContext object Redirect Page from EventHandler

We need to display custom page redirection after adding list item.
We have to implement Synchronous event handler for above list because we can get HttpContext in Synchronous event handler & redirect to custom page using SPUtility.Redirect method.
See the below code for redirect custom page after adding list item. 
public class SyncEventReceiver : SPItemEventReceiver
    {
        HttpContext current;

        public SyncEventReceiver() { current = HttpContext.Current; }

        /// 
        /// An item is being added.
        /// 
        public override void ItemAdding(SPItemEventProperties properties)
        {
            base.ItemAdding(properties);

            SPSite oSite = new SPSite(properties.SiteId);
            SPWeb oWeb = oSite.OpenWeb(properties.RelativeWebUrl);
            SPList oList = oWeb.Lists[properties.ListId];

            //Set Enable Event Firing to False for disable reoccurence of events.
            this.EventFiringEnabled = false;
            
            SPListItem newItem = oList.Items.Add();
            //add item to list (you can add custom code here)
            newItem["Title"] = properties.AfterProperties["Title"].ToString();
            newItem.Update();

            //Set Enable Event Firing to True
            this.EventFiringEnabled = true;

            //redirect it to your new destination like newly provisioned sub site or any other page you want.
            SPUtility.Redirect("http://localhost/pages/default.aspx", SPRedirectFlags.Default, current);

        }

}
Happy Coding...!!!

Difference between Synchronous and Asynchronous events

Synchronous Events

  - Fire “before” the actual events
  - You can get HttpContent
  - You can display error message
  - You can cancel the event.
  - Synchronous methods ending with “ing” like itemadding, itemupdating itemdeleting.




Asynchronous Events
  - Fire “after” the actual events
  - You cannot get HttpContent
  - You cannot display error message
  - You cannot cancel the event
  - Asynchronous methods ending with “ed” like itemadded, itemupdated, itemdeleted etc.


Happy Coding...!!!