SharePoint 2013 – Alerts

Long time J but…

Problem:

I got a little issue related to emails alerts OOTB from couple on time (all most one year J) … wait to see last service pack (1) if the issue is solve or not (answer not)

[http://social.technet.microsoft.com/Forums/sharepoint/en-US/122059da-cb28-4465-beb8-1682fec48922/incorrect-url-in-email-alerts?forum=sharepointadmin]

So: what is exactly the issue?

If I have a SharePoint web application https://intranet.contoso.com and I want to extend the application to https://extranet.consto.com

I have to zone:

After the users create alerts using URL of Extranet zone they get emails with URLs of Intranet zone!!!

Let’s check the database to see if the users create correct alerts in correct zone.

Go to – SQL Server Management Studio – open db associate to web application – table “ImmedSubscriptions”

One user call JDoe@contoso.com subscribe to an alert immediate to library “Shared Documents”

In the column Properties we can check also the whole thing:

<miscellaneous><property name=”dispformurl” value=”Shared Documents/Forms/DispForm.aspx” /><property name=”filterindex” value=”0″ /><property name=”defaultitemopen” value=”Browser” /><property name=”sendurlinsms” value=”False” /><property name=”mobileurl” value=”http://extranet.contoso.com/_layouts/15/mobile/&#8221; /><property name=”eventtypeindex” value=”0″ /><property name=”SiteUrl” value=”http://extranet.contoso.com&#8221; /></miscellaneous>

But when the email arrive has URL of default zone L

One more thing this behavior is only for SharePoint 2013 RTM, SP1 … not for SharePoint 2010 or 2007

Solution:

  1. I tried to fix without code … but I can’t

    Because MS forgot to build “SPAlertHandlerParams ahp in same way like they did in SharePoint 2010 when ahp.siteurl got value from property “SiteUrl” from DB

     

  2. Code solution

     

    Create an old custom alert handler and then correct URLs

     

    Here’s the code for custom alert

     


    public class CustomAlertHandler : IAlertNotifyHandler

    {

    public bool OnNotification(SPAlertHandlerParams ahp)

    {

    try

    {

    using (SPSite site = new SPSite(ahp.siteUrl + ahp.webUrl))

    {

    using (SPWeb spWeb = site.OpenWeb())

    {

    SPAlert a = ahp.a;

    if (a.Properties.ContainsKey(“siteurl”))

    {

    string siteNewURL = a.Properties[“siteurl”];

    string siteOldURL = ahp.siteUrl;

    ahp.body = ahp.body.Replace(siteOldURL, siteNewURL);

    ahp.siteUrl = siteNewURL;

    }

    string to = ahp.headers[“to”].ToString();

    string subject = ahp.headers[“subject”].ToString();

    SPUtility.SendEmail(spWeb, ahp.headers, ahp.body);

    }

    }

    return true;

    }

    catch (Exception ex)

    {

    return false;

    }

    }

     

    After this install wsp on SharePoint server

     

    Next step is to change alerttemplates.xml (of course a copy J) to use new DLL and class

     

    More details: http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/12/14/how-to-customizing-alert-emails-using-ialertnotificationhandler.aspx

    http://blog.zebsadiq.com/post/SharePoint-2010-custom-alert-template.aspx

     

    One more thing about correct email format see http://blogs.msdn.com/b/malag/archive/2008/07/23/alert-emails-not-recognized-by-outlook-as-alert-emails.aspx

     

    Cheers!

     

Posted in Developer SharePoint, SharePoint 2013 | Leave a comment

Connect to Exchange Office 2013 with PowerShell to get Exchange GUID

Very nice script to get Exchange GUID for Office 2013

Set-ExecutionPolicy Unrestricted

$c = Get-Credential (put user for admin Office 365)

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $c -Authentication Basic -AllowRedirection

Import-PSSession $session

Get-Mailbox -Identity ovidiu@ccotinc.com | select ExchangeGUID

See more:

http://blog.migrationwiz.com/2013/03/13/manually-configuring-outlook-for-office-365/

http://technet.microsoft.com/en-us/magazine/hh750396.aspx

Quote | Posted on by | Tagged | Leave a comment

SQL 2012 Reporting Service SP1 and SharePoint 2013 – Add Extension

Problem:

I created or bought an extension for SSRS (SQL Server 2012 Reporting Service) and I want to add this in my SSRS 2012 integrated with SharePoint 2013(or SharePoint 2010)

Reporting Service Extensions: http://msdn.microsoft.com/en-us/library/ms152934.aspx

But in SSRS 2012 integrated mode I can’t add extension in rsreportserver.config (By the way this file is located now in Hive 15\WebServices\Reporting\Bin not in C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer – because SSRS 2012 is in integrated mode not in native mode)

Solution:

PowerShell cmdlets for Reporting Services SharePoint Mode – http://technet.microsoft.com/en-ca/library/gg492249.aspx

  1. copy DLLs extensions in Hive 15\WebServices\Reporting\Bin or add in GAC
  2. add extension in SSRS 2012 with PowerShell

New-SPRSExtension

SYNOPSIS

Registers a new extension with a Reporting Services service application.

SYNTAX

New-SPRSExtension -Identity <ReportingServiceApplicationPipeBind> -ExtensionType <ExtensionType> -Name <string> -TypeName <string> [-CodeGroup <string>] [-ExtensionAttributes <string>] [-ExtensionConfiguration

<string>] [-NamedPermissionSet <string>] [-ServerDirectives <string>] [-Confirm] [-WhatIf] [<CommonParameters>]

DESCRIPTION

PARAMETERS

-CodeGroup <string>

A <CodeGroup /> element that specifies a new or existing code group. The cmdlet automatically updates the rspolicy.config file with the setting you define.

Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-ExtensionAttributes <string>

The extension attributes other than Name and TypeName. These are the same as the Extension attributes in the native mode rsreportserver.config file. For example: “<Visible>false</Visible>.

 

Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-ExtensionConfiguration <string>

The string parameter passed to the SetConfiguration method implemented by the extension. These are the same as the content of the <Configuration /> element for the extension in the native mode

rsreportserver.config file. For example, for the Report Server FileShare extension, it looks like: “<FileShareConfiguration><ExcludedRenderFormats><RenderingExtension>HTMLOWC</RenderingExtension><RenderingExtens

ion>NULL</RenderingExtension><RenderingExtension>RGDI</RenderingExtension></ExcludedRenderFormats></FileShareConfiguration>”

 

Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-ExtensionType <ExtensionType>

The extension type.

 

Valid values are: Delivery, DeliveryUI, Render, Data, Security, Authentication, EventProcessing, SemanticQuery, ModelGeneration, ReportItems, Designer, ReportItemDesigner, ReportItems, Designer,

ReportItemDesigner, ReportItemConverter, and ReportDefinitionCustomization.

 

Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-Identity <ReportingServiceApplicationPipeBind>

The GUID of the Reporting Services service application.

 

Required? true

Position? named

Default value

Accept pipeline input? true

Accept wildcard characters? false

 

-Name <string>

The extension name. For example, “Report Server FileShare”.

 

Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-NamedPermissionSet <string>

A new or existing named PermissionSet in the rspolicy.config file. The cmdlet automatically updates the rspolicy.config file with the setting you define.

 

Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-ServerDirectives <string>

Additional name-value pairs used to configure the extension behavior. These are the same as the peers of the <Configuration /> element for an extension in the native mode rsreportserver.config file. For

example, “<MaxRetries>3</MaxRetries><SecondsBeforeRetry>900</SecondsBeforeRetry>”.

 

Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-TypeName <string>

The full .Net type name and the assembly name of the extension. This is the same as the Type attribute for an extension in the native mode rsreportserver.config file. For example,

“Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider,ReportingServicesFileShareDeliveryProvider”.

 

Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-Confirm [<SwitchParameter>]

Prompts you for confirmation before executing the command.

 

Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

-WhatIf [<SwitchParameter>]

Describes what would happen if you executed the command without actually executing the command.

 

Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false

 

NOTES

In order to execute this cmdlet, a local farm must exist, and you must have farm-level administrator privileges.

 

$extensionType = “Data”

$name=”MyExtension”

$ssrs = Get-SPRSServiceApplication

New-SPRSExtension -Identity $ssrs -ExtensionType $extensionType -Name $name -TypeName “Class,Namespace”

Links:

http://my.theobald-software.com/index.php?/Knowledgebase/Article/View/101/0/deploying-custom-data-extension-to-sharepoint-2010-with-ssrs-in-integrated-mode

http://prologika.com/CS/blogs/blog/archive/2011/11/15/report-server-settings-in-sql-server-2012-sharepoint-integration-mode.aspx

http://blogs.msdn.com/b/jtarquino/archive/2011/10/25/sql-server-2012-reporting-services-sharepoint-integrated-mode.aspx

http://blog.mikehacker.net/2012/05/16/sharepoint-2010-access-services-reporting-with-sql-2012/

http://www.aspose.com/docs/display/slidesreportingservices/Manual+integration+of+Aspose.Slides+in+SSRS+2012+SharePoint+integration+mode

  1. Last step modifying the policy if is necessary rssrvpolicy.config Hive 15\WebServices\Reporting

E.g. Install Nevron DLLs in SSRS 2012 SP1 integrated mode SP 2013

1.       Copy all DLLs of Nevron from install location to Hive15\WebSerices\Reporting\Bin (C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\WebServices\Reporting\bin)

2.       Go to Hive15\WebSerices\Reporting

3.       Go to SharePoint 2013 Management Shell

$ssrs = Get-SPRSServiceApplication

New-SPRSExtension  -Identity $ssrs -ExtensionType “ReportItemDesigner” -Name “NChart” -TypeName “Nevron.ReportingServices.Design.NChartDesigner,Nevron.ReportingServices.ChartDesigner”

New-SPRSExtension  -Identity $ssrs -ExtensionType “ReportItemDesigner” -Name “NGauge” -TypeName “Nevron.ReportingServices.Design.NGaugeDesigner,Nevron.ReportingServices.ChartDesigner”

New-SPRSExtension  -Identity $ssrs -ExtensionType “ReportItems” -Name “NChart” -TypeName “Nevron.ReportingServices.NChart,Nevron.ReportingServices.Chart”

New-SPRSExtension  -Identity $ssrs -ExtensionType “ReportItems” -Name “NGauge” -TypeName “Nevron.ReportingServices.NGauge,Nevron.ReportingServices.Chart”

4.       Modify rssrvpolicy.config

Add these line:

              <CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”FullTrust” Description=”This code group grants Nevron.ReportingServices.Chart FullTrust permissions.” Name=”Nevron.ReportingServices.Chart”>

                <IMembershipCondition class=”StrongNameMembershipCondition” version=”1″ PublicKeyBlob=”00240000048000009400000006020000002400005253413100040000010001006b456ec3d7c085ff9b86ec23afe97a860ddc6286227184f46b2570b6fad90df3ad29b7fc0abcf0e23476be3c61e0daea2ba46164e9f3541cb642edd9fccd170cef05a0749be76b90dea7cbf0b7a306961dbb3f18a84d28905d17e1f0ded3853c4894e10d93d4ba0676c78e5e359c623a37abedb6ca473a11397f2981ead33feb” />

              </CodeGroup>

              <CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”FullTrust” Description=”This code group grants Nevron.Chart.Template FullTrust permissions.” Name=”Nevron.Chart.Template”>

                <IMembershipCondition class=”StrongNameMembershipCondition” version=”1″ PublicKeyBlob=”002400000480000094000000060200000024000052534131000400000100010035e00544d29601ba0c0ced84fd3ea8370eb03402e69a11991f59cd4abf5e695a77dbbeff76a67f86caf4f73667a423d6b5b38262474cb9572f7f711ae83e9d4f3d632b553ec08ec7de0d1f8fb33782548a1e82a86e31036c80cc657af5bf80a55520903a11fb1713db6c0627fa63fc6cd2b15f8889edf46918d2f50916bc9dc2″ />

              </CodeGroup>

              <CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”FullTrust” Description=”This code group grants Nevron.Chart FullTrust permissions.” Name=”Nevron.Chart”>

                <IMembershipCondition class=”StrongNameMembershipCondition” version=”1″ PublicKeyBlob=”0024000004800000940000000602000000240000525341310004000001000100ff7a16c88c5c818604551141f163b69f82097f168ad683e71dd20b370eb40994c8c1cac317d9fcbbed7bf7ec2b639be07ba2f104bfdcd1b35e1a83bf96ec990794c7e0906b3bd79ec7dc4b89b0bb3d0c7ee8f1f92d9199ccb18c194aff53c22e419ac50e25920098b82e52e92860391d812ed9b07c64bf0ebf0b658fa6dd77bb” />

              </CodeGroup>

              <CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”FullTrust” Description=”This code group grants Nevron.Presentation FullTrust permissions.” Name=”Nevron.Presentation”>

                <IMembershipCondition class=”StrongNameMembershipCondition” version=”1″ PublicKeyBlob=”0024000004800000940000000602000000240000525341310004000001000100c1e0502744ec6f6cf5eff84b6d087556e7e1ac1d4cace5b1f07f90bbb33df5022f7b0f529cb681eaa4584904bf770fc7fa0c00a5e9a7dacb82bf3fb4665492755a97ed7247ab2fb0d3c7d74d7f5457c332818ba7c560d451a86f9565058448ea225bae9c30b696a53980ce5cb852015fc4e4567b505de426b12c9497f2ed36b8″ />

              </CodeGroup>

              <CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”FullTrust” Description=”This code group grants Nevron.GraphicsGL FullTrust permissions.” Name=”Nevron.GraphicsGL”>

                <IMembershipCondition class=”StrongNameMembershipCondition” version=”1″ PublicKeyBlob=”0024000004800000940000000602000000240000525341310004000001000100d73bcd4a6e6a8bbe4cf5c8528dbb134de49a9b2543336353d8488a2de2ed05bac23fb70f7f4a03ea51644531784bcd608c2b6f5bd9cfd78d4a56fd1daec85002c5ee7cd6c4fb2acfa08dc9645dffb3ad7e662dfc4ada25b2fe1430646de996f8882e31a7661f3ac8e4827e6b62ec8904ff4184994b140360d49d4978c6808ec7″ />

              </CodeGroup>

              <CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”FullTrust” Description=”This code group grants Nevron.System FullTrust permissions.” Name=”Nevron.System”>

                <IMembershipCondition class=”StrongNameMembershipCondition” version=”1″ PublicKeyBlob=”00240000048000009400000006020000002400005253413100040000010001000f5d2c1d3302473fc0fd6e541ebeef5b5e7ee0cc8032f350db8b657beaf19c307cbd4676a856d899279d8d244af3b7d38624bc8d4165418930dd15200d253b6548bd35e1e36e6381fd3fa9ecaf08dc6b919fd154be557e83e3807aa6d16d2be4294c89db55861e1472337a43d9d17f6fdd03115c89d3684565bfced1ccdfdab9″ />

              </CodeGroup>                                    

Before

<CodeGroup

                      class=”UnionCodeGroup”

                      version=”1″

                      PermissionSetName=”FullTrust”

                      Name=”Analisys_Server_Strong_Name”

                      Description=”This code group grants DataFeedClient.dll full trust. “>

                <IMembershipCondition

                        class=”StrongNameMembershipCondition”

                        version=”1″                        PublicKeyBlob=”0024000004800000940000000602000000240000525341310004000001000100272736AD6E5F9586BAC2D531EABC3ACC666C2F8EC879FA94F8F7B0327D2FF2ED523448F83C3D5C5DD2DFC7BC99C5286B2C125117BF5CBE242B9D41750732B2BDFFE649C6EFB8E5526D526FDD130095ECDB7BF210809C6CDAD8824FAA9AC0310AC3CBA2AA0523567B2DFA7FE250B30FACBD62D4EC99B94AC47C7D3B28F1F6E4C8″

                                />

              </CodeGroup>

 

Posted in SharePoint 2010, SharePoint 2013 | Leave a comment

SQL 2012 Reporting Service SP1 and SharePoint 2013

Couple of days I installed SSRS 2012 SP1 on SharePoint 2013 farm.

Very nice and easy after I read MSDN and couple of blogs J.

http://msdn.microsoft.com/en-us/library/jj219068.aspx

http://msdn.microsoft.com/en-us/library/aa905871.aspx

http://blog.blksthl.com/2012/11/19/hardware-requirements-for-all-sharepoint-2013-components-summarized/#SSRS

http://blogs.msdn.com/b/biblog/archive/2012/12/04/installing-and-configuring-sql-reporting-services-on-sharepoint-2013.aspx

Everything has ok until I try to create a Report Source Data into a library. Automatically I get two error in Application log in my SharePoint Apps Server.

Log Name: Application

Source: SQL Server Reporting Services Shared Service

Date: 3/5/2013 12:38:55 PM

Event ID: 1108

Task Category: Extension

Level: Error

Keywords: Classic

User: N/A

Computer: SharePointAppServer

Description:

SQL Server Reporting Services Shared Service cannot load the SQLPDW extension. (Application: SQL
Server Reporting Services Service, CorrelationId: f4dc049c-4fbe-5023-3ac2-5f64d9621426)

And second one:

SQL Server Reporting Services Shared Service cannot load the TERADATA extension. (Application: SQL Server Reporting Services Service, CorrelationId: f4dc049c-4fbe-5023-3ac2-5f64d9621426)

What means these?

http://jandho.blogspot.ca/2012/06/report-server-cannot-load-teradata.html

I don’t have SQLPDW extension and TERADATA extension. OK no problem, I have two options installed or removed from configure (actually three leaveJ).

Install? Nope, I don’t use TERADATA and SQLPDW

Remove? How … PowerShell

$ssrs = Get-SPRSServiceApplication

$ext = Get-SPRSExtension -Identity $ssrs.Id

$e = $ext | Where-Object {$_.Name -eq “TERADATA” -and $_.ExtensionType -eq “Data” }

Remove-SPRSExtension -Name $e.Name -ExtensionType $e.ExtensionType -Identity $ssrs.Id

Repeat last two commands twice for ExtensionType equal with “SemanticQuery” and “ModelGeneration”

Then again for SQLPW and ExtensionType equal with “Data” and “SemanticQuery”

$e = $ext | Where-Object {$_.Name -eq “SQLPDW” -and $_.ExtensionType -eq “Data” }

Remove-SPRSExtension -Name $e.Name -ExtensionType $e.ExtensionType -Identity $ssrs.Id

$e = $ext | Where-Object {$_.Name – “SQLPDW” -and $_.ExtensionType -eq “SemanticQuery” }

Remove-SPRSExtension -Name $e.Name -ExtensionType $e.ExtensionType -Identity $ssrs.Id

Posted in SharePoint 2013 | Leave a comment

PerformancePoint in SharePoint 2013 not working

Problem:

I have configure SharePoint 2013 & SQL Server 2012 SP1 and I have service application for PerformancePoint Service correct configured.

See http://technet.microsoft.com/en-us/library/jj900678.aspx and http://technet.microsoft.com/en-us/library/jj900677.aspx

But when I tried to create a PerformancePoint Data Source after I put SQL AS name can’t see database name!

Check the application log and I found this:

Unable to load custom data source provider type: Microsoft.PerformancePoint.Scorecards.DataSourceProviders.AdomdDataSourceProvider, Microsoft.PerformancePoint.Scorecards.DataSourceProviders.Standard, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.AnalysisServices.AdomdClient, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.
File name: ‘Microsoft.AnalysisServices.AdomdClient, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.Type.GetType(String typeName, Boolean throwOnError)
at Microsoft.PerformancePoint.Scorecards.Server.PmServer.InitializeCustomDataSourceProviders()
PerformancePoint Services error code 10107.

 

Solution:

Install “1033\x64\SQLSERVER2008_ASADOMD10.msi” from http://www.microsoft.com/en-us/download/details.aspx?id=26728

Posted in SharePoint 2013 | Leave a comment

Windows Server 2008 R2 Hyper-V versus Windows Server 2012 Hyper-V

If we want to build an environment for SharePoint 2013 according to Microsoft Test Lab Guide (TLG):

http://blogs.technet.com/b/tothesharepoint/archive/2012/12/04/sharepoint-server-2013-test-lab-guide-stack-refreshed.aspx

First we need to build a machine to support all these J

My case:

  • Mainboard: ASUS P7X79 Deluxe
  • CPU: Intel Core i7-3930K 3.20GHz
  • RAM: 64GB Corsair Vengeance DDR3 (2x32GB)
  • Graphic Card: NVIDIA Ge210
  • HDD:
    • 1 x 2 TB Western Digital
    • 2 x 2TB Seagate
    • 1 x 500GB Western Digital Raptor for host operating system

I choose Windows Server 2012 because of better Hyper-V implementation see the advantages of new Hyper-V

http://download.microsoft.com/download/2/C/A/2CA38362-37ED-4112-86A8-FDF14D5D4C9B/WS%202012%20Feature%20Comparison_Hyper-V.pdf

And:

Merry Christmas! And Happy New Year!

 

Posted in Windows Server 2008 R2, Windows Server 2012 | Leave a comment

Create web applications that use classic mode authentication in SharePoint 2013

Problem: In SharePoint 2013 we can’t create a classic mode authentication for a web application from UI

Solution: Powershell🙂

At the Windows PowerShell command prompt, type the following command:

 New-SPWebApplication -Name -ApplicationPool -AuthenticationMethod -ApplicationPoolAccount -Port -URL

Where:

  • <Name> is the name of the new web application.
  • <ApplicationPool> is the name of the application pool.
  • < WindowsAuthType > is either “NTLM” or “Kerberos”. Kerberos is recommended.
  • <ApplicationPoolAccount> is the user account that this application pool will run as.
  • <Port> is the port on which the web application will be created in IIS.
  • <URL> is the public URL for the web application.

Example

New-SPWebApplication -Name “SP2013 Intranet Site” -ApplicationPool “IntranetAppPool” -AuthenticationMethod “NTLM” -ApplicationPoolAccount (Get-SPManagedAccount “DOMAIN\jdoe”) -Port 80 -URL “https://intranet.domain.com&#8221;

For more information, see New-SPWebApplication.

Posted in SharePoint 2013 | Leave a comment