A different API is invoked everytime. I did not notice that earlier. Now it is working fine. Thanks Teo.
Having been solved this problem, I'm facing another problem with my custom security extension.
I want my security extension to support both msrs 2000 and msrs 2005, so I have compiled my source code with 8.0.1038.0 version of Microsoft.ReportingServices.Interfaces.dll.
When I run this security extension in 2.0 environment (on msrs 2005 installed machine) I get an exception :
Exception caught instantiating Windows report server extension: System.TypeLoadException: Method 'CheckAccess' in type 'MyCustomSecurityExtension.Authorization' from assembly 'MyCustomSecurityExtension, Version=1.0.2852.34699, Culture=neutral, PublicKeyToken=null' does not have an implementation.
I guess this is because of the two new enums ModelOperation and ModelItemOperation for which the 2005 version of Microsoft.ReportingServices.Interfaces.dll implements CheckAccess functions with prototypes :
public bool CheckAccess(string userName,
IntPtr userToken, byte[ secDesc,
ModelItemOperation requiredOperation)
public bool CheckAccess(string userName,
IntPtr userToken, byte[ secDesc,
ModelOperation requiredOperation)
These two functions are not supported in msrs 2000.
My question is, is it possible for a custom security extension to support both msrs 2000 and 2005? and if yes how do I get rid of this exception?