SSRS custom assembly failure
I've got a DLL that (is supposed to) connect to a web service to obtain a value for presentation on my report. The DLL method always fails when used within an SSRS report, but works fine when utilized within a windows form application running in debug mode. I know the DLL is installed correctly because if I comment out my web service call and return a static value, it works fine. Does anyone know why this would fail given the code and config below? The IIS and SSRS log files do not show any error messages that could help me out. I'm sure I'm missing a config step somewhere, but I don't know where. I've added the web service config information to the web.config file for the ReportServer website. DLL code: [assembly:AllowPartiallyTrustedCallers] ... System.Net.WebPermission webPermission = new System.Net.WebPermission(System.Security.Permissions.PermissionState.Unrestricted); webPermission.Assert(); STSWebService.UsageSoapClient usageClient = new RemoteDataAccess.STSWebService.UsageSoapClient("UsageSoap"); STSWebService.UsageByCC.TotalDataTable totalData = usageClient.GetUsageTotals(startDate, endDate); RSSRVPolicy.config: <PermissionSet class="NamedPermissionSet" version="1" Name="MyPermissions"> <IPermission class="SecurityPermission" version="1" Flags="Assertion, Execution"/> <IPermission class="WebPermission" version="1" Unrestricted="true"/> <IPermission class="SocketPermission" version="1" Unrestricted="true"/> <IPermission class="EventLogPermission" version="1" Unrestricted="true"/> </PermissionSet> <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="MyPermissions" Name="STS_Remote_Data_Access" Description="Techies STS remote data access. "> <IMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\MyWebServiceConnector.dll" /> </CodeGroup>
September 19th, 2008 8:22pm

This is probably a stupid question, but have you actually put the DLL in the C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin\ folder?Also one of the CodeGroups in the RSSRVPolicy.config has a PermissionSetName="Nothing" (I don't currently have access to a RSSRVPolicy.config so I can't to tell you exactly which CodeGroup). Try changing it to FullTrust..
Free Windows Admin Tool Kit Click here and download it now
September 20th, 2008 6:31pm

I do have the DLL installed in the bin dir. You were exactly right with the parent code group. I needed to change it from "Nothing" to "FullTrust" to enable the children. I obviously need to know more about these policy files, but I haven't seen any posts out there that specify this step. Thanks Mark!
September 20th, 2008 11:48pm

This may help: http://msdn.microsoft.com/en-us/library/ms155108.aspx -- Robert
Free Windows Admin Tool Kit Click here and download it now
September 21st, 2008 3:31am

Changing the permissionSetName to FullTrust worked for me as well. Can you explain why?
December 3rd, 2010 2:48pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics