Showing posts with label extension. Show all posts
Showing posts with label extension. Show all posts

Friday, March 9, 2012

Problem deploying data processing extension

I have developed a data processing extension that extends an ADO.NET
provider so that it works with reporting services. That is, it works in the
designer, but when I try to deploy the application, I run into a little
problem.
It loads my wrapper (the actual extension) just fine, but then the log
reports a failure to load the dependency dll. (The ADO.NET provider that my
wrapper extends.)
I'm sure what I need to do is somehow setup the rssrvpolicy.config file so
that it provides correct permissions to both my wrapper and the dependency,
but I cannot find ANY documentation that explains how to do this sort of
thing.
Here is the relevant portion of my config file:
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="FusionWareCodeGroup"
Description="Code group for FusionWare Direct Reporting Services Provider">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
ervices\ReportServer\bin\FusionWare.DirectADO.ReportingServicesProvider2005.dll"
/>
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
Services\ReportServer\bin\FusionWare.DirectADO.dll" />
</CodeGroup>
</PolicyLevel>
</policy>
</security>
</mscorlib>
</configuration>
Note that I've tried to tell it about the second dependency but this is not
working and may, in fact be invalid. I've tried every imaginable
combination to get this going, including multiple CodeGroup elements, but I
still get the following error every time:
aspnet_wp!library!1!2/6/2006-15:34:51:: i INFO: Call to RenderFirst(
'/Report Project1/Report1' )
aspnet_wp!extensionfactory!1!2/6/2006-15:34:52:: e ERROR: Exception caught
instantiating FusionWare report server extension:
System.IO.FileLoadException: Could not load file or assembly
'FusionWare.DirectADO, Version=5.0.61.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. Failed to grant minimum
permission requests. (Exception from HRESULT: 0x80131417)
File name: 'FusionWare.DirectADO, Version=5.0.61.0, Culture=neutral,
PublicKeyToken=null' --> System.Security.Policy.PolicyException: Required
permissions cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
at System.Reflection.Assembly.GetType(String name, Boolean throwOnError,
Boolean ignoreCase)
at
Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.CreateExtensionObject(Extension
extConfig)
.
aspnet_wp!processing!1!2/6/2006-15:34:52:: e ERROR: The connection object of
the data source type FusionWare does not implement any of the required
interfaces.
aspnet_wp!library!1!2/6/2006-15:34:52:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
An attempt has been made to use a data extension 'FusionWare' that is not
registered for this report server., ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
An attempt has been made to use a data extension 'FusionWare' that is not
registered for this report server.
aspnet_wp!processing!1!2/6/2006-15:35:03:: e ERROR: Data source
'DataSource1': An error has occurred. Details:
Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
An attempt has been made to use a data extension 'FusionWare' that is not
registered for this report server.
at
Microsoft.ReportingServices.DataExtensions.ReportDataSource.CreateConnection()
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.OpenConnection(DataSource
dataSourceObj, ReportProcessingContext pc)
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.Process()
aspnet_wp!processing!1!2/6/2006-15:35:03:: e ERROR: An exception has
occurred in data source 'DataSource1'. Details:
Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
An attempt has been made to use a data extension 'FusionWare' that is not
registered for this report server.
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.Process()
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSourceNode.ProcessConcurrent(Object
threadSet)
aspnet_wp!processing!1!2/6/2006-15:35:03:: i INFO: Merge abort handler
called for ID=-1. Aborting data sources ...
aspnet_wp!processing!1!2/6/2006-15:35:03:: e ERROR: Throwing
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing. -->
Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
An attempt has been made to use a data extension 'FusionWare' that is not
registered for this report server.
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.Process()
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSourceNode.ProcessConcurrent(Object
threadSet)
-- End of inner exception stack trace --
aspnet_wp!library!5!2/6/2006-15:44:46:: i INFO: Cleaned 0 batch records, 0
policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running
jobs, 0 persisted streams
Any help would be appreciated!I hate it when I find a question that matches something I'm looking for but
don't see a response, so I'll post my own response:
First a better explanation of the problem:
I have a DPE that extends another dll (an ADO.NET provider).
Designer always worked, but CAS under SSRS would not load the underlying dll
due to permissions. Here is what I had to do to fix it:
First, I had to change the underlying assembly (not the DPE itself) to
Assert FullTrust rights and the right to run for a PartiallyTrusted caller:
In the underlying dll's AssemblyInfo.cs file I added this line:
[assembly: System.Security.AllowPartiallyTrustedCallers()]
Then, for any class that would get called at run-time I added the following
at the top:
using System.Security.Permissions;
and decorated the class itself with this line:
[PermissionSetAttribute(SecurityAction.Assert, Name="FullTrust")]
Then, I had to modify the rssrvpolicy.config file. The tricky part here is
that there are two levels of CodeGroup elements.
There is a top level CodeGroup element that contains a bunch of CodeGroup
elements inside it. The top level default one says that anything you run
into has no permissions. Then inside it, you define exceptions - things
that are allowed to run with various permissions. I had to add a CodeGroup
element that granted my *underlying* dll FullTrust. It looked like this:
</NamedPermissionSets>
<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="Nothing">
<IMembershipCondition
class="AllMembershipCondition"
version="1"
/>
<!-- Added by RHOU -->
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="FusionWareBaseCodeGroup"
Description="Code group for FusionWare Direct ADO.NET Provider">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
Services\ReportServer\bin\FusionWare.DirectADO.dll" />
</CodeGroup>
The normal entry, as documented, for my DPE had to be a new, top-level
CodeGroup element. In otherwords, unlike the one I added above, it was a
sibling of the top-level CodeGroup element, not a child of it. It looked
like this, btw:
</CodeGroup>
</CodeGroup>
</CodeGroup>
<!-- Added by RHOU -->
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="FusionWareCodeGroup"
Description="Code group for FusionWare Direct Reporting
Services Provider">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
Services\ReportServer\bin\FusionWare.DirectADO.ReportingServicesProvider2005.dll"
/>
</CodeGroup>
This combination worked both in SSRS 2005 and the equivalent in SSRS 2000.
I find it interesting that a non DPE had to be defined as part of the
default CodeGroup (nested in it), while the DPE had to be defined separately
from the default CodeGroup. If I moved either CodeGroup element to where
the other was the whole house of cards fell down.
I find that information about how CAS works is really hard to find,
incomplete and contradictory. I also find the complete lack of diagnostic
tools to let me see what permissions were requested, allowed/denied, when
and by whom, is a huge deficit. This is far too important to be left in
this "WAG" condition! Just my thoughts...
FWIW, it worked for me!
"Raoul James" <raoulj456@.hotmail.com> wrote in message
news:OdneBe3KGHA.720@.TK2MSFTNGP14.phx.gbl...
>I have developed a data processing extension that extends an ADO.NET
>provider so that it works with reporting services. That is, it works in
>the designer, but when I try to deploy the application, I run into a little
>problem.
> It loads my wrapper (the actual extension) just fine, but then the log
> reports a failure to load the dependency dll. (The ADO.NET provider that
> my wrapper extends.)
> I'm sure what I need to do is somehow setup the rssrvpolicy.config file so
> that it provides correct permissions to both my wrapper and the
> dependency, but I cannot find ANY documentation that explains how to do
> this sort of thing.
> Here is the relevant portion of my config file:
> <CodeGroup class="UnionCodeGroup"
> version="1"
> PermissionSetName="FullTrust"
> Name="FusionWareCodeGroup"
> Description="Code group for FusionWare Direct Reporting Services
> Provider">
> <IMembershipCondition class="UrlMembershipCondition"
> version="1"
> Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
> ervices\ReportServer\bin\FusionWare.DirectADO.ReportingServicesProvider2005.dll"
> />
> <IMembershipCondition class="UrlMembershipCondition"
> version="1"
> Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
> Services\ReportServer\bin\FusionWare.DirectADO.dll" />
> </CodeGroup>
> </PolicyLevel>
> </policy>
> </security>
> </mscorlib>
> </configuration>
> Note that I've tried to tell it about the second dependency but this is
> not working and may, in fact be invalid. I've tried every imaginable
> combination to get this going, including multiple CodeGroup elements, but
> I still get the following error every time:
> aspnet_wp!library!1!2/6/2006-15:34:51:: i INFO: Call to RenderFirst(
> '/Report Project1/Report1' )
> aspnet_wp!extensionfactory!1!2/6/2006-15:34:52:: e ERROR: Exception caught
> instantiating FusionWare report server extension:
> System.IO.FileLoadException: Could not load file or assembly
> 'FusionWare.DirectADO, Version=5.0.61.0, Culture=neutral,
> PublicKeyToken=null' or one of its dependencies. Failed to grant minimum
> permission requests. (Exception from HRESULT: 0x80131417)
> File name: 'FusionWare.DirectADO, Version=5.0.61.0, Culture=neutral,
> PublicKeyToken=null' --> System.Security.Policy.PolicyException: Required
> permissions cannot be acquired.
> at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
> PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
> PermissionSet& denied, Boolean checkExecutionPermission)
> at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
> PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
> PermissionSet& denied, Int32& securitySpecialFlags, Boolean
> checkExecutionPermission)
> at System.Reflection.Assembly.GetType(String name, Boolean throwOnError,
> Boolean ignoreCase)
> at
> Microsoft.ReportingServices.Diagnostics.ExtensionClassFactory.CreateExtensionObject(Extension
> extConfig)
> .
> aspnet_wp!processing!1!2/6/2006-15:34:52:: e ERROR: The connection object
> of the data source type FusionWare does not implement any of the required
> interfaces.
> aspnet_wp!library!1!2/6/2006-15:34:52:: e ERROR: Throwing
> Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
> An attempt has been made to use a data extension 'FusionWare' that is not
> registered for this report server., ;
> Info:
> Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
> An attempt has been made to use a data extension 'FusionWare' that is not
> registered for this report server.
> aspnet_wp!processing!1!2/6/2006-15:35:03:: e ERROR: Data source
> 'DataSource1': An error has occurred. Details:
> Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
> An attempt has been made to use a data extension 'FusionWare' that is not
> registered for this report server.
> at
> Microsoft.ReportingServices.DataExtensions.ReportDataSource.CreateConnection()
> at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.OpenConnection(DataSource
> dataSourceObj, ReportProcessingContext pc)
> at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.Process()
> aspnet_wp!processing!1!2/6/2006-15:35:03:: e ERROR: An exception has
> occurred in data source 'DataSource1'. Details:
> Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
> An attempt has been made to use a data extension 'FusionWare' that is not
> registered for this report server.
> at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.Process()
> at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSourceNode.ProcessConcurrent(Object
> threadSet)
> aspnet_wp!processing!1!2/6/2006-15:35:03:: i INFO: Merge abort handler
> called for ID=-1. Aborting data sources ...
> aspnet_wp!processing!1!2/6/2006-15:35:03:: e ERROR: Throwing
> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException:
> An error has occurred during report processing., ;
> Info:
> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException:
> An error has occurred during report processing. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.DataExtensionNotFoundException:
> An attempt has been made to use a data extension 'FusionWare' that is not
> registered for this report server.
> at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportRuntimeDataSourceNode.Process()
> at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSourceNode.ProcessConcurrent(Object
> threadSet)
> -- End of inner exception stack trace --
> aspnet_wp!library!5!2/6/2006-15:44:46:: i INFO: Cleaned 0 batch records, 0
> policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running
> jobs, 0 persisted streams
> Any help would be appreciated!
>
>

Problem deploying a custom renderer on MSRS 2005.

Hi,

I have been struggling to deploy a custom rendering extension onto
Reporting services 2005. I have followed all the steps given in the
MSDN article
http://msdn.microsoft.com/msdnmag/issues/05/02/customrenderers/defaul...

Especially -

1. Copied the dll generated to the reporting service bin folder.

2. Made the entry in C:\Program Files\Microsoft SQL Server\MSSQL.
3\Reporting Services\ReportServer\rsreportserver.config file as
<Extension Name="CUSTOM_RENDERER"
Type="MSDNMagazine.CustomRSRenderer.Renderer,MSDNMagazine.CustomRSRenderer"-/


3. Made an entry in C:\Program Files\Microsoft SQL Server\MSSQL.
3\Reporting Services\ReportServer\rssrvpolicy.config file as

<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust" Name="Custom Render Extension"
Description="This code group grants data extensions full trust.">
<IMembershipCondition class="UrlMembershipCondition" version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services
\ReportServer\bin\MSDNMagazine.CustomRSRenderer.dll"/>
</CodeGroup>

I am able to see the extension being listed in the Report manager list
of available rendering options,
But I get the following error from the report server when I try
exporting to the custom rendering extension


An attempt has been made to use a rendering extension that is not
registered for this report server.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Exception: An attempt has been made to use a
rendering extension that is not registered for this report server.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace
below.

Stack Trace:

[Exception: An attempt has been made to use a rendering extension that
is not registered for this report server.]
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean
isAbortable, String url, Stream outputStream, String& mimeType,
String& fileNameExtension) +489
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean
isAbortable, String format, String deviceInfo, NameValueCollection
urlAccessParameters, Stream reportStream, String& mimeType, String&
fileNameExtension) +958

Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String
format, String deviceInfo, NameValueCollection additionalParams,
String& mimeType, String& fileExtension) +84

Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueColl-ection
urlQuery, HttpResponse response) +143
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext
context) +75

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSt-ep.Execute()
+154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) +64

Looking at the logs of the report server at Max trace level, gives me
the following dump


w3wp!processing!b!03/01/2007-22:35:22:: e ERROR: Throwing
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An attempt has been made to use a rendering extension that is not
registered for this report server., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An attempt has been made to use a rendering extension that is not
registered for this report server.
w3wp!chunks!b!03/01/2007-22:35:22:: v VERBOSE: ###
ID=3f94a6f1-8ff7-448c-8cf3-494ab8fe4837, Length=0, CompressedLength=0,
TimeCompressing=0, TimeUncompressing=0, Ratio=0, Buffering=0,
Permanent=False
w3wp!library!b!03/01/2007-22:35:22:: v VERBOSE: Transaction rollback.
w3wp!webserver!b!03/01/2007-22:35:22:: e ERROR: Reporting Services
error Microsoft.ReportingServices.Diagnostics.Utilities.RSException:
An attempt has been made to use a rendering extension that is not
registered for this report server. >
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An attempt has been made to use a rendering extension that is not
registered for this report server.
at
Microsoft.ReportingServices.ReportProcessing.ReportRendererFactory.GetRende-rer(String
format, IReportServerInformation serverInfo)
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateRendere-r(String
format)
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapsho-t(CreateReportChunk
createChunkCallback, RenderingContext rc, GetResource
getResourceCallback)
at
Microsoft.ReportingServices.Library.RenderSnapshotAction.Render()
at
Microsoft.ReportingServices.Library.RSService.RenderFromSessionNoCache(Cata-logItemContext
reportContext, ClientRequest session, RenderingResult& result)
at
Microsoft.ReportingServices.Library.RSService.RenderFromSession(CatalogItem-Context
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters)
at
Microsoft.ReportingServices.Library.RSService.RenderNext(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effecectiveParameters, String[]&
secondaryStreamNames)
at
Microsoft.ReportingServices.Library.RenderNextCancelableStep.Execute()
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper(-)
End of inner exception stack trace
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper(-)
at
Microsoft.ReportingServices.Library.RenderNextCancelableStep.RenderNext(RSS-ervice
rs, CatalogItemContext reportContext, ClientRequest session, JobType
type, Warning[]& warnings, ParameterInfoCollection&
effectiveParameters, String[]& secondaryStreamNames)
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport-(HttpResponseStreamFactory
streamFactory)
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.DoStreamedOp-eration(StreamedOperation
operation)
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(I-temType
itemType)
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageCo-ntent()
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
w3wp!dbcleanup!9!3/1/2007-22:35:41:: v VERBOSE: Starting database
cleanup.
w3wp!library!9!3/1/2007-22:35:41:: v VERBOSE: Call to CleanBatch()
w3wp!dbcleanup!9!3/1/2007-22:35:41:: v VERBOSE: Cleaning expired
sessions from DB
w3wp!library!9!3/1/2007-22:35:41:: v VERBOSE: Transaction begin.
w3wp!library!9!3/1/2007-22:35:41:: v VERBOSE: Transaction commit.
w3wp!dbcleanup!9!3/1/2007-22:35:41:: v VERBOSE: Cleaning expired cache
from DB
w3wp!library!9!3/1/2007-22:35:41:: v VERBOSE: Transaction begin.
w3wp!library!9!3/1/2007-22:35:41:: v VERBOSE: Transaction commit.
w3wp!dbcleanup!9!3/1/2007-22:35:41:: v VERBOSE: Cleaning orphaned
snapshots from DB
w3wp!library!9!3/1/2007-22:35:41:: v VERBOSE: Transaction begin.
w3wp!library!9!3/1/2007-22:35:41:: v VERBOSE: Transaction commit.
w3wp!library!9!3/1/2007-22:35:41:: i INFO: Cleaned 0 batch records, 0
policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0
running jobs, 0 persisted streams
w3wp!dbcleanup!9!3/1/2007-22:35:41:: v VERBOSE: Database cleanup
executed.

Any inputs will be of great help to me. Thanks

Does deploying a custom rendering extension require Reboot of the

machine. I restarted MSSQL Report Server service on the server and this

_did not_ solve the problem.

What is the difference between deploying a custom Data Extension and a

custom Rendering Extension. The former is being deployed properly while

the later isn't.

Atleast, Please point me to some documentation on frequently

encountered problems with custom rendering extensions. I tried

searching on the net but there seems to be lack of any helping

information.
Thanks in advance.