Friday, March 30, 2012

losing custom assembly

Hello all
I've got a problem with a custom assembly used in a Report. It works a
little (i see correct values where it is used), but after a while, it
doesn't seem to work anymore (no more correct values, only some 0 with
the same values in parameters)...
Some facts :
the dll is written in vb and is accessing the sql server to return
some values.
it contains the lines
Dim SQLPermission As New
SqlClientPermission(Security.Permissions.PermissionState.Unrestricted)
SQLPermission.Assert()
(seems to be important)
the dll is located in correct directories :
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin
and
C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer
the file rssrvpolicy.config has been modified with :
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="RS.Utils_Group"
Description="This code group grants custom assembly OASCL01.dll to
access to database">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="file://C:/Program Files/Microsoft SQL Server/MSSQL/Reporting
Services/ReportServer/bin/OASCL01.dll"/>
</CodeGroup>
the DLL is defined in the report properties.
Why do you think it only work for a little time ? (maybe because I
am constantly modifying the report while working on it?)
what can I do to find what's wrong ?
I tried relaunching the reportserver service but nothing...If assembly is not being changed and works at least once when used from a
report published on report server then most likely the problem has nothing
to do with code access security (btw, it looks right).
There might be a bug in the assembly itself.
Usually it is a bad idea to use static variables. Make sure you properly
close all connections / commands / readers you open.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"marc hugon" <sorry@.nospam.com> wrote in message
news:atdbg11fsi5udafl3h881lki03r0lof3jr@.4ax.com...
> Hello all
> I've got a problem with a custom assembly used in a Report. It works a
> little (i see correct values where it is used), but after a while, it
> doesn't seem to work anymore (no more correct values, only some 0 with
> the same values in parameters)...
> Some facts :
> the dll is written in vb and is accessing the sql server to return
> some values.
> it contains the lines
> Dim SQLPermission As New
> SqlClientPermission(Security.Permissions.PermissionState.Unrestricted)
> SQLPermission.Assert()
> (seems to be important)
> the dll is located in correct directories :
> C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer\bin
> and
> C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer
> the file rssrvpolicy.config has been modified with :
> <CodeGroup class="UnionCodeGroup"
> version="1"
> PermissionSetName="FullTrust"
> Name="RS.Utils_Group"
> Description="This code group grants custom assembly OASCL01.dll to
> access to database">
> <IMembershipCondition
> class="UrlMembershipCondition"
> version="1"
> Url="file://C:/Program Files/Microsoft SQL Server/MSSQL/Reporting
> Services/ReportServer/bin/OASCL01.dll"/>
> </CodeGroup>
> the DLL is defined in the report properties.
> Why do you think it only work for a little time ? (maybe because I
> am constantly modifying the report while working on it?)
> what can I do to find what's wrong ?
> I tried relaunching the reportserver service but nothing...

No comments:

Post a Comment