<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="DataExtensions" Description="Code group for my Reports Data Processing Extension"><IIMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\DataExtensions.dll" /><IPermission class="SecurityPermission" version="1" Flags="UnmanagedCode"/></CodeGroup>
I get the Error
An error has occurred during report processing. (rsProcessingAborted) Get Online Help
Query execution failed for data set 'DataSet2'. (rsErrorExecutingCommand) Get Online Help
Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
This <CodeGroup> is under the Hierarchy "FirstMatchCodeGroup".
Is this right or should I set this under some other hierarchy.
Or am I missing anything.
Thanks,
Dinesh
----- Donovan R. Smith [MSFT] wrote: -----
Are there spaces in your Url="" attribute as shown below or are those just
word-wrap issues. If they are carriage returns, please remove them,
iisreset, and try again.
If it still fails, please forward me your *.config files offline so I can
take a look.
--
Thanks.
Donovan R. Smith
Software Test Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
"Marco Della Casa" <marco.d...@trivadis.com> wrote in message
news:#RzRPGo8...@TK2MSFTNGP10.phx.gbl...
> Hi Robert
>> I'have the same problem to like Omar hast, but - my data extention use sam
> others assemblies. I've read also the MSDN article and your new group
posts.
> The code access security is not easy thing. Beond my police
>><CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust"
> Name="TrivadisCodeGroup" Description="Code group for Trivads data
processing
> extension">><IMembershipCondition class="UrlMembershipCondition" version="1"
> Url="D:\Microsoft SQL Server\MSSQL\Reporting
>
Services\ReportServer\bin\Trivadis.ReportingServices.OlapDataExtension.dll"/
>>><IMembershipCondition class="UrlMembershipCondition" version="1"
> Url="D:\Microsoft SQL Server\MSSQL\Reporting
>
Services\ReportServer\bin\Trivadis.ReportingServices.OlapReportParameter.dll
> "/>></CodeGroup>>> Do you have any Idea, was the problem is!
>> Regrdas, Marco
>> --
> Marco Della Casa
> Trivadis AG
> Consult MCT, MCDBA
>>>>> "Robert Bruckner [MSFT]" <rob...@online.microsoft.com> wrote in message
> news:utU6xse8...@TK2MSFTNGP10.phx.gbl...
>> Note sure if my posting came through - trying again ...
>>>> Where exactly in the hierarchy did you add the code group for your
custom
>> assembly? Note: The top level code group type is of FirstMatch type.
>> Probably you added your custom assembly group at the end and some other
> code
>> group has a membership condition that matched first with your custom
>> assembly - so the security manager stopped traversing and it never
reached
>> your custom assembly group with the correct settings.
>>>> --
>> Robert M. Bruckner
>> Microsoft SQL Server Reporting Services
>>>> --
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>>> "Omar Besiso" <anon...@discussions.microsoft.com> wrote in message
>> news:68536D86-7122-4E66...@microsoft.com...
>>> I am readin my dataset from an xml file. Setting all the default
>> permissions to FullTrust didn't work. Anyway though this might help.
This
> is
>> the error I get when I try Asserting the permissions in my code.
>>>>>> {"Request for the permission of type
>> System.Security.Permissions.SecurityPermission, mscorlib,
>> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
>> failed." } System.Exception
>>>>>>>>> Thanks
>>>>>> ----- Robert Bruckner [MSFT] wrote: -----
>>>>>> You are saying your assembly reads data sets?
>>> How do you read them? Even if you use a managed data provider it
> has
>> to
>>> execute some unmanaged code when opening a database connection.
So
>> opening a
>>> database connection requires permissions to execute unmanaged
code:
>>>>>> So you would also need this IPermission:
>>><IPermission
>>> class="SecurityPermission"
>>> version="1"
>>> Flags="UnmanagedCode"
>>> />>>>>>> And you would need to assert the permission before opening any
>> database
>>> connections (e.g. when using the SqlClient):
>>>>>> SqlClientPermission permission = new
>>> SqlClientPermission(PermissionState.Unrestricted);
>>> try
>>> {
>>> permission.Assert(); // Assert security
> permission!
>>> SqlConnection con = new SqlConnection("...");
>>> con.Open();
>>> ...
>>> }
>>>>>> The MSDN documentation always states which permissions are needed
> by
>> certain
>>> method calls. I'm not sure where the FileIOPermission comes
from -
>> but it
>>> has certainly to do with your custom assembly implementation.
>>>>>> --
>>> Robert M. Bruckner
>>> Microsoft SQL Server Reporting Services
>>>>>> --
>>> This posting is provided "AS IS" with no warranties, and confers
no
>> rights.
>>>>>>>>> "Omar Besiso" <omar_...@mail.com> wrote in message
>>> news:B83F296D-E1D6-4928...@microsoft.com...
>>>> Hi all. I've been having big problems with custom assemblies I
am
>> starting
>>> to give up o the whole thing. I have an assembly that reads data
>> sets. I
>>> have done everything as described in "Code Access Security in SQL
>> Server
>>> 2000 Reporting Services" article. There is absolutely no use. I
am
>> always
>>> getting the same error:-
>>>>> Reporting Services Error
>>>>>>>>>>>>>>>>> --------------------------------------------------------------------------
>>> ------
>>>>> An error has occurred during report processing.
>> (rsProcessingAborted) Get
>>> Online Help
>>>> Cannot create command for data source 'Pubs'.
>> (rsErrorCreatingCommand) Get
>>> Online Help
>>>> Request for the permission of type
>>> System.Security.Permissions.FileIOPermission, mscorlib,
>> Version=1.0.5000.0,
>>> Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
>>>>>> Here is a copy of all my configurations any help would be
> highly
>>> appreciated.
>>>>> RSReportServer.config
>>>><Extension Name="DataSet"
>>>>>>
Type="Samples.Microsoft.ReportingServices.DataProcessing.DataSetExtension.Ex
>>> tension,DataSetExtension" />>> rssrvpolicy
>>>><CodeGroup class="UnionCodeGroup"
>>>> version="1"
>>>> PermissionSetName="FullTrust"
>>>> Name="Datasetextensionsecurity"
>>>> Description="Code group for my FSI data processing
>>> extension"><MembershipCondition class="UrlMembershipCondition"
>>>> version="1"
>>>> Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
>>> Services\ReportServer\bin\DataSetExtension.dll"
>>>> /></CodeGroup>>> I also tried asserting permissions into the
file
>> and once it got to the
>>> permission.assert() method it gave me a fileIOpermission error.
>> Please note
>>> that the files i am trying to read from have full permissions and
>> everyone
>>> using the maching can access them inclusing my local ASPNET
> account.
>>>>> Any help or advice again would be highly appreciated.
>>>>>>>>>>>>>>>
"An error has occurred during report processing. (rsProcessingAborted) Get Online Help
Query execution failed for data set 'DataSet1'. (rsErrorExecutingCommand) Get Online Help
Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed."
It only works if i set the following CodeGroup to "FullTrust" (instead of Nothing)...
<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="Nothing">
[...]
Setting the "Report_Expressions_Default_Permissions" code group (as suggested from Teo Lachev) did not work.
Any help would be great!
Greetings,
Frank Peters
I hate to give you the "Works on my computer answer" but I retested the
extension and it works on my machine with xml files. Inside the dataset
extension code I specifically demand FileIOPermission in case you pass a
file path. This permission should be satisfied if you adjust the Report
Server policy file by adding the following element at the end:
<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust" Name="AWCExtensionsCodeGroup">
<IMembershipCondition class="UrlMembershipCondition" version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\AWC.RS.Extensions.dll"/>
</CodeGroup>
Needless to say, you have to repeat this step for the Report Designer policy
file if you test the report with F5.
--
Teo Lachev, MCSD, MCT
Author: "Reporting Services in Action"
www.manning.com/lachev
"Frank Peters" <FPe...@RosenInspection.net> wrote in message
news:786DB9DE-2D9E-408D...@microsoft.com...
--
Teo Lachev, MCSD, MCT
Author: "Reporting Services in Action"
www.manning.com/lachev
"Teo Lachev" <t...@online.hotmail.com> wrote in message
news:eY1ed8iA...@TK2MSFTNGP09.phx.gbl...
--
Teo Lachev, MCSD, MCT
Author: "Reporting Services in Action"
www.manning.com/lachev
"Teo Lachev" <t...@online.hotmail.com> wrote in message
news:eY1ed8iA...@TK2MSFTNGP09.phx.gbl...