Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / January 2006

Tip: Looking for answers? Try searching our database.

Deployed report with custom assembly fail when calling web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonas - 27 Jan 2006 14:28 GMT
Hi,

I'm developing a report that calls a web service using a custom assembly.
I've got the code working in VS.NET, but when I deploy to my local Report
Server, I get this:

System.Security.SecurityException: Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed

I have added the following to RSReportServer.config:

 <CustomAssemblies>
    <Assembly Name="cmcs.wsclient.dll, Version=1.0.xxx.xxxx,
Culture=neutral, PublicKeyToken=xxx">
     <PermissionSet class="System.Security.PermissionSet">
        <IPermission
           class="System.Security.Permissions.SecurityPermission"
           version="1"
            Flags="Execution, Assertion"
        />
        <IPermission class="System.Security.Permissions.WebPermission"
           version="1"
           Unrestricted="true"
        />
        <IPermission
class="System.Security.Permissions.EnvironmentPermission"
  version="1"
           Unrestricted="true"
  />
     </PermissionSet>
  </Assembly>
    <Assembly Name="cmcs.msrs.webserviceclient, Version=1.0.xxx.xxxx,
Culture=neutral, PublicKeyToken=xxx">
     <PermissionSet class="System.Security.PermissionSet">
        <IPermission
           class="System.Security.Permissions.SecurityPermission"
           version="1"
            Flags="Execution, Assertion"
        />
        <IPermission class="System.Security.Permissions.WebPermission"
           version="1"
           Unrestricted="true"
        />
        <IPermission
class="System.Security.Permissions.EnvironmentPermission"
  version="1"
           Unrestricted="true"
  />
     </PermissionSet>
  </Assembly>
  <Default>
     <PermissionSet class="System.Security.PermissionSet">
        <IPermission
           class="System.Security.Permissions.SecurityPermission"
           version="1"
           Flags="Execute"
        />
     </PermissionSet>
  </Default>
</CustomAssemblies>

In rssrvpolicy.config, I have changed the PermissionSet for
Report_Expressions_Default_Permissions to FullTrust and added the following:

                 <CodeGroup class="UnionCodeGroup"
                            version="1"
                            PermissionSetName="FullTrust"
                            Attributes="LevelFinal"
                            Name="ReportServer-cmcs.msrs.webserviceclient"
                            Description="Codegroup generated by the .NET
Configuration tool">
                    <IMembershipCondition class="UrlMembershipCondition"
                                          version="1"
                                          Url="file://C:/Program
Files/Microsoft SQL Server/MSSQL/Reporting
Services/ReportServer/bin/cmcs.msrs.webserviceclient.dll"/>
                 </CodeGroup>

It works to call a HelloWorld method returning a string from the custom
assembly, so there is no total failure, but calling the method to invoke the
web service fails.

Please help, I feel that I'm totally stuck!

Jonas
Jonas - 30 Jan 2006 22:21 GMT
By moving my CodeGroup in rssrvpolicy.config to right under the first
default CodeGroup, it I got it to work ...

<CodeGroup

class="FirstMatchCodeGroup"

version="1"

PermissionSetName="Nothing">

<IMembershipCondition

class="AllMembershipCondition"

version="1"

/>

***** RIGHT UNDER HERE *****

It seems like my CodeGroup wasn't used by ReportServer until the move. We'll
just have to see how long time it will work before it breaks again ;-)

> Hi,
>
[quoted text clipped - 65 lines]
>                              PermissionSetName="FullTrust"
>                              Attributes="LevelFinal"

Name="ReportServer-cmcs.msrs.webserviceclient"
>                              Description="Codegroup generated by the .NET
> Configuration tool">
[quoted text clipped - 12 lines]
>
> Jonas
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.