We have a custom assembly that worked fine with SSRS 2000. Now that we have upgraded to SQL 2005 we get an "Access is denied" error when attempting to deploy reports that reference this assembly. I could swear that when we first attempted it it worked. We decided to make a minor change to the assembly code and that's when the problem started, even though I've since reverted back to the original code to make certain that the minor change wasn't the issue. The assembly is in the proper folder - C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin - and the reports are referencing the current version. I've searched high and low on the web for an answer but have found nothing even remotely helpful. All this code does is return a string...it's not doing anything that should require any additional security; and even then I doubt if there would be a problem when deploying.
The full text of the error is:
Error while loading code module: ‘Reporting, Version=1.0.2778.12272, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'Reporting, Version=1.0.2778.12272, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.
Any ideas? Anyone? I'm at my wit's end on this!
Thanks,
Mike
Please read this.
http://www.codeproject.com/useritems/Reporting_Services.asp
Priyank
|||Have you deployed your assemby dll to the GAC or it is in the File System.If you have it in the files system be sure it is also in the folder. Install path / ReportingServices/ReportServer/bin and / ReportingServices/ReportManager/bin|||
Thanks, but I've tried this and it made no difference.
The code was originally developed in VS2003 and deployed to a SQL 2000 server, just as in the linked article. All we did was copy the dll to the appropriate folder on the server and it worked. The difference now is that we're using VS2005 and SQL 2005. The only other difference is that formerly SRSS and our SQL db's all resided on the same server and now they are on separate servers. I've copied the dll only to the SRSS server. Should it also be on the db server?
|||
gatharia wrote:
Have you deployed your assemby dll to the GAC or it is in the File System.
If you have it in the files system be sure it is also in the folder. Install path / ReportingServices/ReportServer/bin and / ReportingServices/ReportManager/bin
It's in the file system and resides in the appropriate folder. It's exactly as it was when we were using VS2003 and SQL 2000. I can't help but think it's server related, because the only difference (other than the aforementioned versions) is that we've migrated to new servers and whereas we formerly had only the one server with SRSS and our db's, they now reside on different servers.
|||I do not think you should copy to the db server. When moving your code to VS 2005 did you create a different strong name? If so then your public token may be different and this may cause issues. If the public token is different or same be sure that you have added a strong name blob to the following files. Installpath/ReportServer/rssvpolicy.config and Installpath/reportmanager/rsmgrpolicy.config. To do so bakup your config files, open the files in your editor and locate the last entry of </CodeGroup></CodeGroup>
Above this add a code group above the above lines like
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="CustomAssembly"
Description="This code group grants My cusstom Assembly permissions. ">
<IMembershipCondition
class="StrongNameMembershipCondition"
version="1"
PublicKeyBlob="0x0024000004800000940000000602000000240000525341310004000001000100AFEAEE95A2C6AE85CCAD6B8FA54E79514BB1690FD4803F93B0033B101A90107873E90511CF5A89BF624961DDAC82B1D10E89F991403B98F18C2CFCF87B8C09CCFA4AF20C9B3DF1DD6DBCA4A3AE2854030DDCE3313B1B9610F922B9881C9ABE05EC2AE451F1C20D42FE753F05E278EC964C5B9580E04090507C2A8B336BE3C7B5"
/>
</CodeGroup>
You MUST replace the PublicKeyBlob with the blob for your assembly. To get this blob use the command
SECUTIL.EXE -s assemblyname.dll > blob.txt
This send the blob to the file blob.txt
Add your assembly to the GAC instead of file system. Stop the RS process and restart.
No comments:
Post a Comment