SSRS Query execution failed for dataset

January 29, 2014

When you get this error. Scratch your head !

clip_image002

In the CAML definition I saw the usage of parameters. So far so good.

clip_image004

But the Query did not run ? Sad smile

Solution :

Remove the parameter definition in the CAML.

clip_image006

This will empty the Query Parameter Value Settings

clip_image008

Add the Parameters as FILTERS

clip_image010

Now the report runs without any problems !


Outlook 2007 Connection Issues

January 29, 2014

I was experiencing an issue with a user having issues after migration of of exchange 2003 to exchange 2010.

When starting outlook 2007 it took 5 minutes before outlook was properly started Sad smile

clip_image002

Outlook was hanging all time.

After getting started on a wrong foot. I was thinking there was something wrong with his profile. After recreating from scratch it did not solve the issue ?

After my search on the net I tried several steps, untill this solved the issue.

It was an Add-on that was bugging me.

In Outlook 2007 go to Tools –> Trust Center –>

Add-ins

clip_image004

Go to Manage COM Add-ins

clip_image006

Disable all Add-ins. But notice that in some case you get this message

image

To solve it start Outlook as Administrator

clip_image008

I restarted and disabled all of them.

YES the problem was solved ! Smile

Now you can test by activating 1 by 1 to see which is giving you a headache.

This approach might apply also for other versions of Outlook.


How to Publish the Active Directory as a SharePoint List

January 26, 2014

Ever wondered how you could publish your Active Directory in a SharePoint List. It will show all entries dynamically.

Step 1

First of all you need to setup a linked server in MS SQL using the ADSL provider

 
-- CREATE LINKED Server to ADSI

-- sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces', 
'ADSDSOObject', 'adsdatasource'

-- CREATE VIEW in the ICT DB

USE ICT ;

GO

IF OBJECT_ID ('ADSI_USERS', 'V') IS NOT NULL

DROP VIEW ADSI_USERS ;
 
GO

CREATE VIEW ADSI_USERS

AS 

SELECT * FROM OpenQuery (ADSI, 'select title, displayName, sAMAccountName, 
givenName, department, mail, telephoneNumber, sn, physicalDeliveryOfficeName
from ''LDAP://dc=domain,dc=local'' where objectCategory=''user''
AND objectCategory = ''Person'' AND displayName = ''*'' ')

GO

-- Select the USERS to test the connection

USE ICT

Select * from ADSI_USERS

To Drop a Linked server

Sp_DropServer 'ADSI', 'droplogins'

Step 2

Set the correct security

Set security to BE MADE USING THE CURRENT SECURITY CONTENT !

Giving the correct user and password to connect.

clip_image002

Step 3

Create an External content type in SharePoint Designer using the ADSI data source.

And make sure that you change the Authentication Mode security of the Default and Client to BCD Identity

image

See here is the output.

image

And the beauty is that you can reuse these accounts as lookup Fields in other lists !

This makes sure you are always in sync with your AD.

Enjoy !


SharePoint – Managing the Security Model

January 26, 2014

SharePoint delivers a security Model that is a combination of AD and SP Users & Groups.

Which makes a granular approach for setting up security on SharePoint Objects.

But the Downside is that is get’s misty after a while when you want to control the security Farm wide 😦

Therefore I tried to introduce this simplified approach

I created in AD 4 OU’s :

– Department Groups

– Distribution Groups

– Security Groups

– User Structure

clip_image004

In the User Structure I have an OU per subsidiary.

And in the OU just a list of all individual users in that subsidiary.

clip_image008

The Security Goups are used to add AD users in specific Groups, to be used in SharePoint are for other applications  access like MS SQL access etc.

image

In Distribution Groups are the AD Groups used in Exchange as Email Groups per Department per subsidiary.

image

In Department Groups are the AD Groups per Department containing users across the subsidiaries.

image

Coming back to the SharePoint Security settings.

Here is an example on how you can keep an overview on the Site or Site Collection Access Permissions.

Extra benefits are that if new users come in, you just add them to the proper AD groups. And they get automatically access to the correct Sites Collections / Sites in SharePoint. Without too much interference of IT.

clip_image016

The Members SharePoint Group, is left empty

clip_image018

The Owners SharePoint Group, contain the Administrator

clip_image020

The Visitors SharePoint Group, Contain all AD Department Groups

clip_image022

And as last we added a Domain Group  domain\all in Pxx which has all Subsidiary AD users in it.

On downside adding AD Groups is that SharePoint can’t check who is in the AD Group as user immediately, depending on your Token Timeout settings. Default is 24 Hrs 😦

clip_image024

Also try to make special SharePoint Security Permission levels on top of the standard ones.

Like Contribute_MinDelete or Contribute_MinEdit etc.

Go to Site Actions -> Site Permissions -> Permission Levels

clip_image026

image

Tips using AD groups

Adding AD users to the AD Group are not immediately reflex in the Check Permission box ?

Solution is to set the token refresh timer to a more reasonable frequency, standard it is set at 10 Hours?

CLS if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"})
-eq $null) 
{ 
Add-PSSnapin Microsoft.SharePoint.PowerShell; 
} 

$sts = Get-SPSecurityTokenServiceConfig 

$sts.FormsTokenLifetime = (New-TimeSpan -Minutes 60) # <- default 10 hour 

write-host $sts.FormsTokenLifetime 

$sts.WindowsTokenLifetime = (New-Timespan –Minutes 5) # <- default 10 hour 

write-host $sts.WindowsTokenLifetime 

$sts.LogonTokenCacheExpirationWindow = (New-Timespan –Minutes 2)
# <- default 10 mins 

write-host $sts.LogonTokenCacheExpirationWindow 

$sts.Update() 

# Do a reset on WFE ! 

# iisreset 
[/sourcecode Language]

If the PS script does not work use the stsadmin.exe tool instead. I had to use this method instead too ?

Default is 1440 min or 24 Hrs !

“%CommonProgramFiles%\Microsoft Shared\web server extensions\14\BIN\stsadm.exe” -o getproperty -propertyname token-timeout

“%CommonProgramFiles%\Microsoft Shared\web server extensions\14\BIN\stsadm.exe” -o setproperty -propertyname token-timeout -propertyvalue 30

# Do a reset on WFE !

iisreset

Second problem that may occur is that the Security Group Scope is not set correct when the AD Group was created. Don’t use Distribution Groups !

Change it from UNIVERSAL to GLOBAL

clip_image030

Bottom Line :

So as you can see by combining the SharePoint Group with AD Groups, you can keep in control.

Rule number one, is to limit individual access permissions as much as possible in SharePoint.


How to Debug XSL Variables

January 26, 2014

Sometimes you need to build some conditional tests in you SharePoint Forms using XSL.

All of that is not a problem, but degugging a variable is a different story.

<xsl:variable name=”LOOKUP_ID”><xsl:value-of select=”@Account_x003a_ID” disable-output-escaping=”no”/></xsl:variable>

<xsl:copy-of select=”$LOOKUP_ID” />

<!– display the value of the variable used in test below on the existence of CRM account for the current value—>

Using the <xsl:copy-of method is very useful to check the content of the variable and display it in a form at anytime.

Tip : look at the different syntax select=”$LOOKUP_ID” starts with a ‘$’ instead of a @

Enjoy !


How to add the Field Validation – Data Required

January 9, 2014

In some case when you have list fields you want to enforce that the user adds data BEFORE he save it to SharePoint.

image

But in what if the option is not available ?

image

You can simply add it by going to the List Settings

image

Select the Proper Content Type and relevant Field in this case Priority

image

And change the setting to Required (Must contain information)

image

Voila !


IE Browser History Recovery

January 3, 2014

 

Windows Vista and Windows 7 in Normal Privilege Mode look here :

%LocalAppData%\Microsoft\Internet Explorer\Recovery\Last Active

Windows Vista and Windows 7 in Elevated Administrator Privilege Mode look here :

%LocalAppData%\Microsoft\Internet Explorer\Recovery\High\Last Active

The main .dat file name look like the following:

RecoveryStore.{GUID}.dat

Where GUID is Globally Unique Identifier which is different for each user and computer.

For each tabs and windows of IE opened, IE will create as many different .data files for each of them in the following name format to store the details and data of the web pages:

{GUID}.dat

Where GUID is Globally Unique Identifier which is vary for each browsing session.

Tip: The “Active” folder, the sister folder of “Last Active”, is used to frequently store current state of IE for automatic crash recovery.

Easy recovery can be done using Previous Versions at any time, for OLDER versions of your IE tabs

image

For more recent restores of your IE TABS just go the to

%LocalAppData%\Microsoft\Internet Explorer\Recovery\Active

And find the recover .dat you need based on the last crash date, there will be many in there.

image

Well is restoring a previous version not enough to complete the exercise.

Simply copying these files and starting IE doesn’t do a crash recovery.

You need to find the flag, it sets so IE knows its previously crashed.

Inside it’s various {GUID}.dat files which are in binary format. So that will be hard to read.

Solution :

IE prepends its recovery files with ‘RecoveryStore.’

And each session file is named like this ‘{1A332508-877F-11E4-9521-002713BCD33C}.dat’

So a recovery file is like this ‘RecoveryStore.{1A332508-877F-11E4-9521-002713BCD33C}.dat’

image

When IE is running it has a registry key matching the name here :

‘HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Recovery\Active’

The key is without the Prepend and file extension so such as ‘{1A332508-877F-11E4-9521-002713BCD33C}’

If IE closes down successful the key is deleted from the registry. Sad smile

image

So after re-entering the ‘RecoveryStore’ {GUID} ID  in the registry it restored what I lost  Smile

image

Enjoy !