Hi,
I have a problem calling Assembly.GetSatelliteAssembly inside a custom assembly referenced by a report. This assembly is used only for localization, and all it does is load the appropriate localized satellite assembly and pull a translated string out of it. The problem doesn't manifest itself if the report is viewed by a user that has higher privileges, but for a user with only the Browser role the GetSatelliteAssembly method throws a System.IO.FileLoadException "Access is denied: Resources.resources" (the custom assembly is called Resources.dll).
The assembly has no strong key and has the AllowPartiallyTrustedCallers attribute in AssemblyInfo. I did set fullTrust in the rssrvpolicy.config, like this:
<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="TestCodeGroup"
Description="A special code group for my custom assembly.">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\Resources.dll"/>
</CodeGroup>
I even tried asserting a FileIOPermission on the satellite dll prior to calling GetSatelliteAssemblies: the assert succeeds but the problem remains.
I'm using RS2000 SP2 with the whatsit hotfix (build no. 1402, IIRC). Note that this exception doesn't seem to appear if I try the same report in RS2005, but migrating is currently not an option.
What should I do? If this is a bug in RS2000 is there a workaround? Any suggestions are welcome.
Thanks in advance!
The old rule has proven true again, the answer comes by itself once you post the question to others...
The fusion log showed that GetSatelliteAssembly searches for the satellite dll in the ReportServer/bin folder, but also in Temporary ASP.Net Files... So, one part of the solution was to give the user modify permission on it. The other part was to give him read permission on the satellite assembly - and this is strange because the main assembly doesn't require extra permissions, but the satellite assembly does.
I'm sure I'm not seeing the big picture here, so if someone can shed any amount of light (
) on this issue, it would be appreciated.