Tuesday, November 26, 2013

SharePoint 2013: Provisioning Reporting Services Subscriptions

In attempting to create Report subscriptions in our new SharePoint 2013 production environment, we received and error:

The EXECUTE permission was denied on the object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.

Initially I thought that we just needed our DBA to grant the reporting services execution account EXECUTE rights on the extended stored procedure noted. There was a little more to the solution.

The Reporting Services Execution Account needs to have access to the SQL Server Agent but the access is granted through the RSExec role. We noticed that this role existed on the reporting services databases but wasn't on any of the system databases (e.g. master, msdb). SharePoint 2013 makes this easy to resolve! You can download a script that incorporates the execution account, adds the roles, and grants all of the proper permissions.

Simply navigate to the Reporting Services Application in Central Admin and click on Provision Subscriptions and Alerts:

 
Click on the Download Script button:

If you have database access, Open the file or Save it locally and send it to your DBA:



Run the script on your SharePoint database server:

 
 
 
The script obtains the account using a user guid. You can verify that this account is your Reporting Services Execution Account by issuing a SELECT against the SUSER_SNAME function:



After the script is run, the ability to create Reporting Services Subscriptions from SharePoint 2013 should work like a charm!

Note: If the reporting services managed account does not exist in all of your environments, you should download the script in each one (Stage, QA, Production, etc.) and run them separately.

 

Thursday, November 21, 2013

InfoPath 2013: Misconfiguration of the State Service

In testing InfoPath forms in my new SharePoint 2013 staging environment, I received a blank screen with only error text:


The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service.

Misconfiguration? I didn't even have the service running. Since it was a staging environment, I usually just configure and install components as needed. I needed the State Service installed.

I found simple PowerShell commands to create the State Service here. Once you run the commands with your specific parameters, you receive the following output:



This matched to what the post showed so I knew I was good.

In Central Admin under Manage Service Applications, the State Service entry should now be shown with the Started state:



Once this happens, InfoPath Forms Services is able to render forms!


 

SharePoint 2013: InfoPath 2013 - Enabling Cross Domain Data Access

During the process of upgrading an InfoPath 2007 form to InfoPath 2013 (2010) and publishing to a staging environment, I received an error when attempting to open a new form:

A query to retrieve form data cannot be completed because this action would violate cross-domain restrictions.

The reason this happened in my case was because the form was published to staging but the data connections within the form all point to production. For this process, it was safe for me to allow cross-domain access.

To resolve this problem, navigate to Central Administration and click on the General Application Settings. Under General Application settings click on Configure InfoPath Forms Services:


 
Scroll down on the settings page and locate Cross-Domain Access for User Form Templates:
 



Simply check the box and click OK:



That's it! Your form should now be allowed to use data connections that may exist on a different farm.
 

SharePoint 2013 Search: BCS Crawl Error - Server Too Busy Exception

I recently was attempting to crawl external data using BCS. I started to receive errors in the crawl log:


Error while crawling LOB contents. ( Error caused by exception: System.ServiceModel.ServerTooBusyException An error occurred. Administrators, see the server log for more information. )

Server too busy? I knew my servers weren't pegged. Tracing the errors in the ULS logs, I found the following:

The BDC Service application Business Data Connectivity Service is not accessible. The full exception text is: The HTTP service located at http://SSRSServer:32843/c2f2c958afc44ef0a9058500c319a619/BdcService.svc/http is unavailable.

What had happened was I was actually moving the BCS Service around to different servers. I had it running on my search servers but wanted to see if I could relieve resource usage if I moved BCS to a different tier. I moved them to our SSRS servers, did some testing, but then decided to move the BCS Services back to the search servers.

The error in the ULS logs showed me that the crawl was still trying to access BCS on the SSRS Servers. A quick reboot of my search servers (running all search components except query and index so search doesn't go down) and the crawl of the BCS content continued working as normal!



 

Tuesday, November 12, 2013

SharePoint 2013: Producing a PDF Report from Reporting Services Integrated Mode

Scenario
We have a financial report that lives in a SharePoint Report library. The report takes a parameter named requestID . The report needs to be rendered as a PDF document.

When the developer constructed the URL, he used the RSViewerPage.aspx as follows:


http://sp2013/sites/reports/_layouts/15/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/reports/FinancialSummary.rdl&rp:requestId=12345&rs:Format=PDF&rv:ParamMode=Collapsed

Problem
Using the RSViewerPage.aspx does not allow the generation of reports in other formats.

Solution
1. Instead of using the RSViewerPage.aspx use the report server address: http://sp2013/_vti_bin/ReportServer

2. Remove the rv:RelativeReportUrl and use an absolute URL:
http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl

3. Pass any report parameters as themselves - remove the "rp:" :
http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl&requestId=22188

4. Add the reporting services command to render, format as PDF, and make sure the parameter pane is closed:
&rs:Command=Render&rs:Format=PDF&rv:ParamMode=Collapsed

The fully transformed URL for our example is as follows:

http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl&requestId=22188&rs:Command=Render&rs:Format=PDF&rv:ParamMode=Collapsed


 

Friday, November 8, 2013

SharePoint 2013 Search: Crawl Issue - SPServiceContextScope is Being Disposed Out of Order

We were experiencing "blank" search results from certain result types related to business data connectivity service content sources. When attempting to run full crawls, there would be periods of crawl issues in the crawl log:


Error while crawling LOB contents. ( Error caused by exception: System.InvalidOperationException This SPServiceContextScope is being disposed out of order.; SearchID = <<guid>> )

I figured this was causing the empty results to appear and there seemed to be no way of fixing this. I didn't want to reset all content as we have many content sources and I would spend all day trying to crawl each one. So therefore I decided to try a less disruptive approach and it worked!

Here's what I did:

  1. Deleted the Content Source from the Search Service Application
  2. Recreated the Content Source using the same name.
  3. Run a full crawl on the content source
  4. Once the full crawl is finished, repeat for any other BCS content sources.
This was very easy and it fixed all of my blank results. In addition, this process did not bring down search or remove any content. This was a great fix-in-place solution!

On completion of my full crawls, I now had no Warnings or Errors on the two content sources I recreated:





 

Matched Content