Wednesday, December 14, 2016

Add-SPSolution : Operation is not valid due to the current state of the object.

Add-SPSolution : Operation is not valid due to the current state of the object.

At line:1 char:1

+ Add-SPSolution

+ ~~~~~~~~~~~~~~

+ CategoryInfo : InvalidData: (Microsoft.Share...dletAddSolution:

SPCmdletAddSolution) [Add-SPSolution], InvalidOperationException

+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSolutIon

I have received this error when I’m trying to deploy an .wsp file to the SharePoint farm using PowerShell Scripts.

It’s kind of unusual the error I have got but

image

IIS reset

Solved my problem.

Wednesday, December 7, 2016

Default SharePoint 2013 / 2010 System Pages where you should takecare when you go online

There are list of SharePoint System Pages which inheriting view permission by default. If you are going to make public SharePoint site , you might not want to access these pages by anonymous users or by Form Based Authentication User.

There are may ways to restrict the users access to these pages that I will explain later in a different post.

Below I’m listing down pages ; those are available in each site under layout mapping.

Site Collection and Site Level Recycle Bin Urls

/_layouts/15/AdminRecycleBin.aspx

image

/_layouts/15/RecycleBin.aspx
image

User , User Info , Site Permission related Urls

_layouts/15/permsetup.aspx

This is used to create default groups in SharePoint such as visitors, members and owners.

image

/_layouts/15/people.aspx?MembershipGroupId=0

All People Url , This can be even used to delete users from the site collection

image

User Information Hidden List Urls

/_catalogs/users/detail.aspx

/_catalogs/users/simple.aspx

image

These lists are actually available from previous version of SharePoint. These are hidden lists available in the SharePoint containing user information.

/_layouts/15/userdisp.aspx?id={UserID}&Force=True

This is used to view user information in the same page without redirecting to my site.

image

/_layouts/quiklnch.aspx

This is used to manage quick launch items in SharePoint.

image

/_layouts/15/AreaNavigationSettings.aspx

This is used to modify navigation setting in the site collection.

image

Workflow history hidden list

/Lists/Workflow%20History/AllItems.aspx

This is hidden list for manage and view workflow  history items.

image

Site usage page

/_layouts/15/usage.aspx

This is used to view the usage information. but nothing harmful.

image

Site content and structure pages

/_layouts/15/sitemanager.aspx
This will bring you site management page which is available from SharePoint 2007.

image

/_layouts/vsubwebs.aspx

List of heirachy pages

image

/_layouts/15/settings.aspx

This is the site setting page that contains all administrative links.

image
/_layouts/15/viewlsts.aspx

This is used to view all site contents. List’s visibility if this page can be hidden using SharePoint designer.
image

Site and Site Collection feature management links

/_layouts/15/ManageFeatures.aspx
/_layouts/15/ManageFeatures.aspx?Scope=Site

These links are used activate and deactivate features in site and site collection.

image

SharePoint designer Settings

/_layouts/15/SharePointDesignerSettings.aspx

This is used to enable and disable SharePoint designer settings.

image

Look and Feel Urls

/_layouts/ChangeSiteMasterPage.aspx
This is used to change site collection master pages.

image
/_Layouts/AreaTemplateSettings.aspx

This is where user can change Page Layouts, Site Templates and other related settings.

image
/_catalogs/masterpage/Forms/AllItems.aspx

This is main document library for update and maintain related files and master pages

image

Friday, November 18, 2016

Office Web Apps Not Showing Review Tab in SharePoint 2013

I’m used to do my developments are testing for SharePoint Apps in SharePoint Online rather than using OnPrem deployment singe its easy.

But I suddenly found out Office Web Apps on my On Premise environment not showing Review tab on Word Documents which SharePoint Online does.image

When I searched through the root cause, I have found out OnPrem updates are little bit behind the O365 updates. Apart from Review tab there are few other functionalities missing in OnPrem version.

Following list down the current available updates for Office Web Apps.

15.0.4420.1007 RTM 
15.0.4481.1005 March 2013 PU         KB2760445
15.0.4481.1508 April 2013 CU         KB2810007
15.0.4505.1001 April 2013 Hotfix     KB2799821
15.0.4517.1003 June 2013 CU         KB2817350
15.0.4535.1000 August 2013 CU         KB2817521
15.0.4551.1003 October 2013 CU         KB2825686
15.0.4551.1508 December 2013 CU     KB2850013
​15.0.4551.1515 ​MS14-001 Security Update ​KB2863879
​15.0.4569.1000 ​Service Pack 1 ​        KB2817431
​15.0.4569.1000 ​Service Pack 1 - Mark 2     ​KB2880558
​15.0.4605.1001 ​April 2014 CU ​        KB2863899
​15.0.4615.1001 ​MS14-022 ​        KB2952166
​15.0.4623.1001 ​June 2014 CU ​        KB2881051
​15.0.4631.1000 ​July 2014 CU ​        KB2883003
​15.0.4641.1001 ​August 2014 CU ​        KB2883093
​15.0.4659.1001 ​October 2014 CU         ​KB2889898
​15.0.4673.1000 ​December 2014 CU     ​KB2899574
​15.0.4693.1001 ​February 2015 CU ​    KB2956101
​15.0.4701.1001 ​March 2015 CU ​        KB2956158
​15.0.4711.1000 ​April 2015 CU ​​        KB2965306
​15.0.4719.1002 ​May 2015 CU         ​KB3039748
​15.0.4727.1001 ​June 2015 CU ​        KB3054863
​15.0.4737.1001 ​July 2015 CU         ​KB3054930
​15.0.4745.1001 ​August 2015 CU ​        KB3055003
​15.0.4753.1001 ​September 2015 CU ​    KB3085487
​15.0.4763.1000 ​October 2015 CU ​        KB3085571
​15.0.4797.1001 ​February 2016 CU ​    KB3114338
​15.0.4805.1000 ​March 2016 CU         ​KB3114821
​15.0.4815.1000 ​April 2016 CU         ​KB3114934
​15.0.4823.1003 ​May 2016 CU ​        KB3115022
​15.0.4833.1003 ​June 2016 CU ​        KB3115170
​15.0.4841.1000 ​July 2016 CU         ​KB3115289
​​15.0.4849.1000 ​August 2016 CU         ​​KB3115446
​15.0.4859.1000 ​September 2016 CU     KB3118270
​15.0.4867.1000 ​October 2016 CU         ​KB3118360
​15.0.4875.1000 ​November 2016 CU ​    KB3127929

Sunday, October 30, 2016

SharePoint 2013 Automatically Redirects to another Mapping

 

There are multiple reason for this behavior of your sharepoint farm. exclusing all other DNS mapping and firewall and proxy configurations there might be a problem in SharePoint Access mapping that will cause the this behaviour.

Furthur descrbing the issue…

when you type http://abc.company.ae it may redirect to http://d.company .ae ; the second address also you wanted and imagine its in AAM.

This behaviour is tottaly because of Aulternate Acess mapping , where you have put abc.company.ae and d.company.ae in same default zone in Alternate Access Mapping.

so just delete one entry from Default Zone and put it to another Zone.

Monday, October 24, 2016

Email option in Delivery Extension is not available in SharePoint 2013 integrated Mode

As you already know Report Server can be run either in Native mode or SharePoint integrated mode.

Report server has feature of scheduling subscriptions for your reports. Report Subscription allows you to schedule your reports to deliver to recipients.

image

There are few Delivery mechanisms available in SharePoint.

  • Windows File Share
  • Email
  • SharePoint Document Library
  • Null Delivery Provider

There might be a situation that you cannot find the Email option in the list.

What you need to do is configure Email in Report Server Application.

How to Configure Email server for reporting server

Go to Central admin and then go to Manage Service Applications

image

Then find the related Reporting Server Service Application and click on

SQL Server Reporting Services Service Application

image

Then go to Email Setting Section

image

And Enter you SMTP server details.

image

And save the settings.

Now you can find the Email delivery option in the subscription settings.

Sunday, September 18, 2016

Customize PageNotFoundError.aspx

PageNotFoundError.aspx is a SharePoint default Error page which is resides on <SharePointrl>/pages library.

http://<SharePoint>/Pages/Forms/AllItems.aspx

image

As you can see it is by default using Layout called Error.

If you want to edit the exiting page you can simply check out and Edit the page in the browser.

image

If you can want to change the Layout you can change the Page Layout out by editing the page layout.

If you are good at PowerShell scripts, you can Update the custom page Url in Site Collection property.

$spsite = Get-SPSite “http://<SharePoint>”

$spsite.FileNotFoundUrl = “/pages/myerror.aspx“

Monday, September 12, 2016

How to filter SharePoint list Based in Date Time related functions in SharePoint 2013 using REST/ODATA

REST queries are quiet familiar when you are working with SharePoint Apps and SharePoint development.

I have found quiet difficult to pass the Date Time parameter to REST and took few minutes to figure that out.

There are two ways to end points to access list data.

http://<SharePoint Url>/_api/web/lists/getbytitle('Pages')/items?

http:// <SharePoint Url>/_vti_bin/listdata.svc

And these functions are working only on listdata.svc

These are few example of REST queries which uses Created Column as a sample field.

 

Filter using day () function

http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = day(Created) eq 2

 

Filter using month () function

http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = month (Created) eq 2

 

Filter using year () function

http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = year (Created) eq 2

 

Filter using hour () function

http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = hour (Created) eq 2

 

Filter using minute () function

http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = minute (Created) eq 2

 

Filter using second () function

http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = second (Created) eq 2

Tuesday, August 30, 2016

Working with SharePoint Report Server 2012 using URL parameters in SSRS 2008/2012 in SharePoint Integrated Mode – Part Two

In my previous post I have explained how to pass the custom URL parameter to the Report when it is SharePoint Integrated Mode.

As explained earlier post report server parameter has three parts.

<prefix>:<Parameter Name>= <Value>

 

Parameter Type

Prefix

Note

Report Viewer Control

rc:

Report Server HTML controller

Report Server

rs:

Report Server to process

Report Viewer Web Part

rv:

Web part parameters

Report Parameters

rp:

Report parameters (Explained in Part One)

When you are running the Report Server under SharePoint, You can Access the report Server using /_vti_bin/reportserver.

You can find similar page if report server is running.

image

 

rc:

This is for passing parameters to Report Server HTML viewer.

Here are the list of parameters.

  • rc:Parameters
  • rc:Zoom
  • rc:Section
  • rc:FindString
  • rc:StartFind
  • rc:EndFind
  • rc:FallbackPage
  • rc:GetImage
  • rc:Icon
  • rc:Stylesheet

EX: - http://mysharePoint/_vti_bin/ reportserver?<Document Library URL>&rc:Parameters=Collapsed

There are few other options you can find it using this link

REF : https://msdn.microsoft.com/en-us/library/ms152835.aspx

rv:

This is used to pass parameters to Report Server Web Part.

These are the parameters for SharePoint Report Server Web Part.

  • rv:Toolbar
  • rv:HeaderArea
  • rv:DocMapAreaWidth
  • rv:AsyncRender
  • rv:ParamMode
  • rv:DocMapMode
  • rv:DockToolBar
  • rv:ToolBarItemsDisplayMode

EX: - http://mysharePoint/_vti_bin/ reportserver?<ReportURL.RDL>&rv:Toolbar=full

REF : https://msdn.microsoft.com/en-us/library/ms152835.aspx

rs:

These parameters are send to Report Server itself.

These are the parameters for SharePoint Report Server. There are two kind of parameters.

rs:Command

    • listChildren

    • GetChildren

    • Render

    • GetDataSourceContents

    • GetResourceContents

EX:

http://<mySharePOint>/_vti_bin/reportserver?<Document Library>&rs:Command=GetChildren

  • rs:Format
  • rs:ParameterLanguage
  • rs:Snapshot
  • rs:PersistStreams
  • rs:GetNextStream
  • rs:SessionID
  • rs:ClearSession
  • rs:ResetSession
  • rs:ShowHideToggle

http://<mySharePOint>/_vti_bin/reportserver?<Document Library>&rs:Format=PDF

REF: https://msdn.microsoft.com/en-us/library/ms152835(v=sql.110).aspx

Thursday, August 11, 2016

SharePoint 2013 Web site Keep on Prompting for credentials

There are many reasons to happen this but most of the time it will happen when you change the Access mapping to match your domain.

For an example you might have webwfe01 as your web application in your default zone. And if you change that to www.sampleweb.com this may be occurred for Windows Users.

image

This is because by not having Fully Qualified Domain name specified is not matching with the local machine.

For an Example,

Your local machine can be in a domain myorg.com and the specified Mapping is sampleweb.com

Thus this will cause LoopBack check which it true by design for security reasons.

Microsoft specifies two methods to resolve the issue.

  1. Disable Strict Name Checking [Ref]

  2. Disable Loopback Check [Ref]

REF: https://support.microsoft.com/en-us/help/896861/you-receive-error-401.1-when-you-browse-a-web-site-that-uses-integrated-authentication-and-is-hosted-on-iis-5.1-or-a-later-version

You need to do it all SharePoint servers for safe side in the future service deployment. But it is necessary for all Front End servers.

Tuesday, July 26, 2016

How to filter SharePoint list Based in Date Time in SharePoint 2013 using REST/ODATA

REST queries are quiet familiar when you are working with SharePoint Apps and SharePoint development.

I have found quiet difficult to pass the Date Time parameter to REST and took few minutes to figure that out.

These are few example of REST queries which uses Created Column as a sample field.

Filter Greater than Date

http://<sharepointurl>/_api/web/lists/getbytitle('Pages')/items?$filter=Created gt dateTime'2017-03-03T00:00:00Z'

Filter Less than Date

http://<sharepointurl>/_api/web/lists/getbytitle('Pages')/items?$filter=Created lt dateTime'2017-03-03T00:00:00Z'

Filter Equal Date

http:// <sharepointurl>/_api/web/lists/getbytitle('Pages')/items?$filter=Created eq dateTime'2017-03-03T00:00:00Z'

Filter Between Dates

http:// <sharepointurl>/_api/web/lists/getbytitle('Pages')/items? $filter=( Created gt dateTime'2016-03-03T00:00:00Z' and Created lt dateTime'2017-03-03T00:00:00Z')

Wednesday, July 13, 2016

'C:\inetpub\wwwroot\wss\VirtualDirectories\80\_app_bin\Microsoft.SharePoint.WorkflowServices.ApplicationPages.dll' because it is being used by another process.

'C:\inetpub\wwwroot\wss\VirtualDirectories\80\_app_bin\Microsoft.SharePoint.WorkflowServices.ApplicationPages.dll' because it is being used by another process.

I have received this error when I’m trying to create a Web Application in central admin.

image

I did a IIS reset and tried again and it worked.

image

But when I tried again I got the same error after Restarting the Server it went off fully.

Tuesday, June 14, 2016

Disable Loopback Check in IIS

This is use full in many scenarios. For me it’s more use full for disable keep on prompting credentials in SharePoint 2013 Environment.

In this method you can simply disable the check by editing the following registry key.

Open the RegEdit.

image

And navigate to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

image

Click on Lsa Registry and add DisableLoopbackCheck registry key as DWORD value.

image

After adding the registry key you can find the entry as follows.

image

Then double click the key and Enter 1.

image

And click OK.

Then restart the IIS.

Monday, May 30, 2016

System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘xp_sqlagent_notify’, database ‘mssqlsystemresource’, schema ‘sys’.

 

This error occured to me when im trying to access the Manage Processing Oprions in SharePoint SSRS.

image

An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. —> Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. —> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘xp_sqlagent_notify’, database ‘mssqlsystemresource’, schema ‘sys’.”

Cause is configurations isses and provisioning issues of Reporting Server User on Related Databases (Master , SSRS)

You can resolve the issue by re run the script on your database server.

For that you can downlod the report from the Central Admin by

Application Management  ->  Manage service applications

image

Then go to Reporting server service application

image

and clisk and download the script and execute in the database server.

image

Thursday, May 26, 2016

System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

 

This error occured to me when i triyng to connect to a SQL database from SharePoint App which is use Entity Framework.

This is a timeout issue when app is trying to connect to a SQL database and connection was expired before execution.

I simply connected it adding a Coonection Timeout to the connection string.

<add name="dbtemponeEntities" connectionString="metadata=res://*/DataModels.dbtempone.csdl|res://*/DataModels.dbtempone.ssdl|res://*/DataModels.dbtempone.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=ASQL;initial catalog=dbtempone;persist security info=True;Connection Timeout=120;user id=SQLAdmin;password=*****$so;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

Wednesday, May 11, 2016

Dissable paging in SSRS Reports on SharePoint 2013

 

I have a problem with showing a entire report (without page brakes) in the SharePoint with the ssrs integrated mode.

I have tried many options and nothing work but changing the Height of the InteractiveSize to 0 worked for me

image

Monday, April 25, 2016

Disable Strict Name Checking in IIS

This is use full in many scenarios. For me it’s more use full for disable keep on prompting credentials in SharePoint 2013 Environment.

In this method you need to add your domain as an exception list to IIS for not checking the FQDN for loopback.

Open the RegEdit.

image

And navigate to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

and click on MSV1_0

image

Then add new Multi Connection String

And add BackConnectionHostNames

image

Then you will see that is added to the registry.

image

You can double click and add your fully qualified domain names (One per line) that will be working as an exception.

image

Then you can save and restart the IIS.

Monday, April 4, 2016

Working with SharePoint Report Server using URL parameters in SSRS 2008/2012 in SharePoint Mode – Part One

There is a slightly different between earlier SSRS report parameters and NEW SSRS running in SharePoint server 2013.

URL parameters are slightly different from native mode and SharePoint Mode. This article is only about SharePoint mode parameters.

SSRS running on SharePoint has few parameter types and types are passing to SSRS engine using prefix.

 

Parameter Type

Prefix

Note

Report Viewer Control

rc:

Report Server HTML controller

Report Server

rs:

Report Server to process

Report Viewer Web Part

rv:

Web part parameters

Report Parameters

rp:

Report parameters

Most of the time passing parameters to report is more frequently used than any other Passing the Reports as a URL Parameter

Assume that we have created a Report with parameter interval and need to pass the values from the URL.

image

Let’s see the attributes of the @interval parameter.

image

I have mentioned the visibility as visible but you can also have it as Internal as well. Internal will not be visible to users for selection.

If you are running the report from SharePoint it will having url something like below.

http://www.myportal.com/_layouts/15/ReportServer/RSViewerPage.aspx? &rv:RelativeReportUrl=/ReporlLocation/myreport.rdl&rc:Parameters=Collapsed

Assume that you need to pass the parameter “interval” in url. Thus you need to append the following URL parameter.

rp:interval=cm

URL parameter has three sections

Prefix - rp:

Parameter name - interval

Value – cm

So your final URL will be something like follows

http://www.myportal.com/_layouts/15/ReportServer/RSViewerPage.aspx? &rv:RelativeReportUrl=/ReporlLocation/myreport.rdl&rc:Parameters=Collapsed& rp:interval=cm

Monday, March 28, 2016

Report Server has encountered a SharePoint error. in SharePOint 2013

Report Server has encountered a SharePoint error. ---> Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error. ---> Microsoft.SharePoint.SPException: The user does not exist or is not unique. ---> System.Exception: For more information about this error navigate to the report server on the local server machine, or enable remote errors in SharePOint 2013

This is error accouring because of Anonimous access to the Microsoft Reporting Services. According to the Microsoft ; Microsoft Reporting Service not supporting annonimous access for integrated mode.

Ref: https://msdn.microsoft.com/en-us/library/bb283324.aspx#Anchor_4

image

So you might be wondered how you can archive this.

Option One

Simply you can dissable the Anonimous access from IIS. But this wont work if you really want anonimous access in your farm. For an Example If are hosting internet site with integration mode public reports you can not dissable the anonimous access.

image

image

Option Two

This is a smart workaround that you can do. in sharepoint reports are rendering usign aspax called RSViewerPage.aspx which is resides in 15 hive.

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\ReportServer\RSViewerPage.aspx

So there are the steps.

  • Create a New Web Application to host your public reports.
  • Copy RSViewerPage.aspx page and paste it as RSViewerPagePublic.aspx (You can use any name)
  • Open the file and register a Control Tempplate which handles the login for the Anonimous users. We are going to implement that it will auto login to a some user account for anonimous users.

In that case report server will see it is as a authenticated user and we are just using a dummy user login to represent the anonimous user.

since it is a different web application it wont conflict with your content web application user.

<%@ Register TagPrefix="RSWP" Namespace="Microsoft.ReportingServices.SharePoint.UI.WebParts" Assembly="Microsoft.ReportingServices.SharePoint.UI.WebParts,Version=11.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="code" TagName="AutoLogin" src="~/_controltemplates/15/Code/AutoGuestLogin.ascx" %>

<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Page language="C#" Codebehind="RSViewerPage.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.ReportingServices.SharePoint.UI.RSViewerPage,Microsoft.ReportingServices.SharePoint.UI.ServerPages,Version=11.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="<%$Resources:wss,multipages_direction_dir_value%>" runat="server" style="overflow:hidden;width:100%;height:100%">
<head runat="server" lang="<%$Resources:wss,language_value%>">

  • Creating the control templete and a web part

You need to pass your user name and password in here and make auto login.

  • that refer change the report view url to point your created aspx,

http://data.com/_layouts/15/ReportServer/RSViewerPagePublic.aspx?rv:RelativeReportUrl=ActivityReport.rdl