none
SSRS Deploy problem

    Question

  • Hi,
    I have used System.core.dll(.netframework dll) in SSRS for time zone calculation.

    I am able to see the results in preview.But when i deploy the corresponding column shows as '#Error'.

    So i feel that SSRS report manager not trusting.

    So i added my system.core.dll in follwing places and updated rsmgrpolicy and rssrvpolicy files.

    dll added in below places
    *******************
    C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin

    C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager\Bin

    rsmgrpolicy
    *********
    <CodeGroup
    class="FirstMatchCodeGroup"
    version="1"
    PermissionSetName="Execution"
    Name="CoDeMagSample"
    Description="CoDe Magazine Sample. ">
    <IMembershipCondition
    class="UrlMembershipCondition"
    version="1"
    Url="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting

    Services\ReportServer\bin\System.Core.dll"
    />
    </CodeGroup>

    rssrvpolicy
    ********
    <CodeGroup
    class="UnionCodeGroup"
    version="1"
    PermissionSetName="FullTrust"
    Name="CoDeMagSample"
    Description="CoDe Magazine Sample. ">
    <IMembershipCondition
    class="UrlMembershipCondition"
    version="1"
    Url="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting

    Services\ReportServer\bin\System.Core.dll"
    />
    </CodeGroup>

    In the URL i tried with below values:
    ***************************
    C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin

    C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager\Bin

    C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5

    Pl do the needful to fix this issue?
    Thursday, July 08, 2010 8:29 AM

All replies

  • In C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer I presume that you need also in rsreportserver.config file which configures with report server.
    Nanda - Misys Software Solutions,Bangalore
    Thursday, July 08, 2010 9:00 AM
  • Hi BeharaVenkata,

    Which code i need to copy in rsreportserver.config


    Pl help me soon.

    Thursday, July 08, 2010 9:30 AM
  • Hi BeharaVenkata,

    Which code i need to copy in rsreportserver.config


    Pl help me soon.

    Thursday, July 08, 2010 9:30 AM
  • Sorry for the confusion, I presume that you need to add PermissionSet to the DLL which you have referred in the Report.

    In rssrvpolicy file, there will be some permissionSet tags, append new Permission block like below

     <PermissionSet

                       class="NamedPermissionSet"

                        version="1"

                        Name="FullTrust"

                        Description="Time Zone calculations using" />

     

    If above didn't worked out then try below

     

    <PermissionSet

                       class="NamedPermissionSet"

                        version="1"

                        Name="TimeZoneCalculation"

                        Description="Time Zone calculations using" 

    <IPermission

                  class="SecurityPermission"

                  version="1"

                  Flags="Assertion, Execution"/>

    <IPermission

                  class="FileIOPermission"

                  version="1"

                  Unrestricted="true"/>

    />

     

    <CodeGroup

    class="UnionCodeGroup"

    version="1"

    PermissionSetName="TimeZoneCalculation"  //Mention the name of permission set which we have add in permission set

    Name="CoDeMagSample"

    Description="CoDe Magazine Sample. ">

    <IMembershipCondition

    class="UrlMembershipCondition"

    version="1"

    Url="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting 

    Services\ReportServer\bin\System.Core.dll"

    />

    </CodeGroup>

     


    Nanda - Misys Software Solutions,Bangalore
    Thursday, July 08, 2010 10:16 AM
  • Hi BeharaVenkata,

    i tried above one.But didnt work.

    <configuration>
      <mscorlib>
        <security>
          <policy>
            <PolicyLevel version="1">
              <SecurityClasses>
                <SecurityClass Name="AllMembershipCondition" 
    
    Description="System.Security.Policy.AllMembershipCondition, mscorlib, Version=1.0.5000.0, Culture=neutral, 
    
    PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="AspNetHostingPermission" Description="System.Web.AspNetHostingPermission, 
    
    System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="DnsPermission" Description="System.Net.DnsPermission, System, 
    
    Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="EnvironmentPermission" 
    
    Description="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, 
    
    PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="FileIOPermission" Description="System.Security.Permissions.FileIOPermission, 
    
    mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="FirstMatchCodeGroup" Description="System.Security.Policy.FirstMatchCodeGroup, 
    
    mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="IsolatedStorageFilePermission" 
    
    Description="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=1.0.5000.0, Culture=neutral, 
    
    PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="NamedPermissionSet" Description="System.Security.NamedPermissionSet"/>
                <SecurityClass Name="PrintingPermission" Description="System.Drawing.Printing.PrintingPermission, 
    
    System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
                <SecurityClass Name="ReflectionPermission" 
    
    Description="System.Security.Permissions.ReflectionPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, 
    
    PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="RegistryPermission" Description="System.Security.Permissions.RegistryPermission, 
    
    mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="SecurityPermission" Description="System.Security.Permissions.SecurityPermission, 
    
    mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="SocketPermission" Description="System.Net.SocketPermission, System, 
    
    Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="SqlClientPermission" Description="System.Data.SqlClient.SqlClientPermission, 
    
    System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="StrongNameMembershipCondition" 
    
    Description="System.Security.Policy.StrongNameMembershipCondition, mscorlib, Version=1.0.5000.0, Culture=neutral, 
    
    PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="UnionCodeGroup" Description="System.Security.Policy.UnionCodeGroup, mscorlib, 
    
    Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="UrlMembershipCondition" 
    
    Description="System.Security.Policy.UrlMembershipCondition, mscorlib, Version=1.0.5000.0, Culture=neutral, 
    
    PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="WebPermission" Description="System.Net.WebPermission, System, 
    
    Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <SecurityClass Name="ZoneMembershipCondition" 
    
    Description="System.Security.Policy.ZoneMembershipCondition, mscorlib, Version=1.0.5000.0, Culture=neutral, 
    
    PublicKeyToken=b77a5c561934e089"/>
              </SecurityClasses>
              <NamedPermissionSets>
    			<PermissionSet
    
              	class="NamedPermissionSet"
             	version="1"
    	        Name="TimeZoneCalculation"
    	        Description="Time Zone calculations using" 
    
    			<IPermission
         			class="SecurityPermission"
    		        version="1"
    		        Flags="Assertion, Execution"/>
    			<IPermission
    		       class="FileIOPermission"
    		       version="1"
    		       Unrestricted="true"/>
    			/>
    
                <PermissionSet
                    class="NamedPermissionSet"
                    version="1"
                    Unrestricted="true"
                    Name="FullTrust"
                    Description="Allows full access to all resources"
                />
                <PermissionSet
                    class="NamedPermissionSet"
                    version="1"
                    Name="Nothing"
                    Description="Denies all resources, including the right to execute"
                />
                <PermissionSet
                    class="NamedPermissionSet"
                    version="1"
                    Name="Execution">
                  <IPermission 
                      class="SecurityPermission"
                      version="1"
                      Flags="Execution"
                  />
                </PermissionSet>
    
    			
              </NamedPermissionSets>
              <CodeGroup 
                  class="FirstMatchCodeGroup"
                  version="1"
                  PermissionSetName="Nothing">
                <IMembershipCondition 
                    class="AllMembershipCondition"
                    version="1"
                />
                <CodeGroup
                    class="UnionCodeGroup"
                    version="1"
                    PermissionSetName="Execution"
                    Name="Report_Expressions_Default_Permissions"
                    Description="This code group grants default permissions for code in report expressions and 
    
    Code element. ">
                  <IMembershipCondition
                      class="StrongNameMembershipCondition"
                      version="1"
                      
    
    PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100512C8E872E28569E733BCB123794DAB55111A0570B3B3D
    
    4DE3794153DEA5EFB7C3FEA9F2D8236CFF320C4FD0EAD5F677880BF6C181F296C751C5F6E65B04D3834C02F792FEE0FE452915D44AFE74A0C27E0D8E4B8D0
    
    4EC52A8E281E01FF47E7D694E6C7275A09AFCBFD8CC82705A06B20FD6EF61EBBA6873E29C8C0F2CAEDDA2"
                  />
                </CodeGroup>
                <CodeGroup 
                    class="FirstMatchCodeGroup" 
                    version="1" 
                    PermissionSetName="Execution"
                    Description="This code group grants MyComputer code Execution permission. ">
                	<IMembershipCondition 
                      class="ZoneMembershipCondition"
                      version="1"
                      Zone="MyComputer" />
                  <CodeGroup
                      class="UnionCodeGroup"
                      version="1"
                      PermissionSetName="FullTrust"
                      Name="Microsoft_Strong_Name"
                      Description="This code group grants code signed with the Microsoft strong name full 
    
    trust. ">
                    <IMembershipCondition
                        class="StrongNameMembershipCondition"
                        version="1"
                        
    
    PublicKeyBlob="002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87
    
    FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C
    
    1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293"
                    />
                  </CodeGroup>
                  <CodeGroup
                      class="UnionCodeGroup"
                      version="1"
                      PermissionSetName="FullTrust"
                      Name="Ecma_Strong_Name"
                      Description="This code group grants code signed with the ECMA strong name full trust. ">
                    <IMembershipCondition
                        class="StrongNameMembershipCondition"
                        version="1"
                        PublicKeyBlob="00000000000000000400000000000000"
                    />
                  </CodeGroup>
                  <CodeGroup
                      class="UnionCodeGroup"
                      version="1"
                      PermissionSetName="FullTrust"
                      Name="Report_Server_Strong_Name"
                      Description="This code group grants Report Server code full trust. ">
                    <IMembershipCondition
                        class="StrongNameMembershipCondition"
                        version="1"
                        
    
    PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100272736AD6E5F9586BAC2D531EABC3ACC666C2F8EC879FA
    
    94F8F7B0327D2FF2ED523448F83C3D5C5DD2DFC7BC99C5286B2C125117BF5CBE242B9D41750732B2BDFFE649C6EFB8E5526D526FDD130095ECDB7BF210809
    
    C6CDAD8824FAA9AC0310AC3CBA2AA0523567B2DFA7FE250B30FACBD62D4EC99B94AC47C7D3B28F1F6E4C8"
                    />
                  </CodeGroup>
                  <CodeGroup
                      class="UnionCodeGroup"
                      version="1"
                      PermissionSetName="FullTrust">
                    <IMembershipCondition 
                        class="UrlMembershipCondition"
                        version="1"
                        Url="$CodeGen$/*"
                    />
                  </CodeGroup>
    			
    				<CodeGroup
        				class="UnionCodeGroup"
        				version="1"
        				PermissionSetName="TimeZoneCalculation"
        				Name="CoDeMagSample"
        				Description="CoDe Magazine Sample. ">
        					<IMembershipCondition
          				class="UrlMembershipCondition"
          				version="1"
          				Url="C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting 
    
    Services\ReportServer\bin\System.Core.dll"
      				/>
    				</CodeGroup>
    
    
    				
                  <CodeGroup
                      class="UnionCodeGroup"
                      version="1"
                      PermissionSetName="FullTrust"
                      Name="SharePoint_Server_Strong_Name"
                      Description="This code group grants SharePoint Server code full trust. ">
                    <IMembershipCondition
                        class="StrongNameMembershipCondition"
                        version="1"
                        
    
    PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100AFD4A0E7724151D5DD52CB23A30DED7C0091CC01CFE94B
    
    2BCD85B3F4EEE3C4D8F6417BFF763763A996D6B2DFC1E7C29BCFB8299779DF8785CDE2C168CEEE480E570725F2468E782A9C2401302CF6DC17E119118ED20
    
    11937BAE9698357AD21E8B6DFB40475D16E87EB03C744A5D32899A0DBC596A6B2CFA1E509BE5FBD09FACF"
                    />
                  </CodeGroup>
                </CodeGroup>
              </CodeGroup>
            </PolicyLevel>
          </policy>
        </security>
      </mscorlib>
    </configuration>
    
    
    Thursday, July 08, 2010 12:55 PM
  • Hi prabuks,

    System.Core is full trusted by default, we don't need to add it to the policy files again.

    The assembly we should add it is the customer assembly.
    In additionaly, the URL for Code Group in rsmgrpolicy.config is different with rssrvpolicy.config.
    rsmgrpolicy.config: C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager\Bin\customassembly.dll
    rssrvpolicy.config: C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\customassembly.dll

    As testing only, we can try set the following code group in rsmgrpolicy to FullTrust to check if the custom code works:

    <CodeGroup 
            class="FirstMatchCodeGroup" 
            version="1" 
            PermissionSetName="Execution"
            Description="This code group grants MyComputer code Execution permission. ">
           <IMembershipCondition 
             class="ZoneMembershipCondition"
             version="1"
             Zone="MyComputer" />

    If it works, please re-set it to Execution, and then apply an Execution Account for the Reporting Services to run the custom coce security.

    For more information about Execution Account, please see:
    http://msdn.microsoft.com/en-us/library/ms181156.aspx

    If you have any more questions, please feel free to ask.

    Thanks,
    Jin Chen


    Jin Chen - MSFT
    Friday, July 09, 2010 12:24 PM
  • Hi Jin,

    Still i am facing the problem.

    what i done was,

    i created RDL with one dataset.

    Then i referenced System.Core.dll through report properties.

    wrote expression for one column with following code.

    =IIF(Fields!timing.Value Is Nothing,"",
        iif(Parameters!show_date_with_time.Value=true,
    			(System.TimeZoneInfo.ConvertTimeBySystemTimeZoneId(
    			 Fields!timing.Value,TimeZoneInfo.Utc.Id,Parameters!TimeZone.Label).ToString("yyyy-MM-dd HH:mm:ss"))
    			,
    			(System.TimeZoneInfo.ConvertTimeBySystemTimeZoneId(
    			Fields!timing.Value,TimeZoneInfo.Utc.Id,Parameters!TimeZone.Label).ToString("yyyy-MM-dd"))
    		)
       )

    it works fine in preview.

    Then i wright click RDL and given deploy.

    Thats it for that particular column it returns value as '#error'

    can u pl try in ur system this to replicate?

    I am in urgent to fix this.

    Friday, July 09, 2010 3:49 PM