FileIOPermission Error when exporting pdf

I install aspose.pdf for SSRS with MSI Installer, but when I wanna export the pdf (1.jpg), error occurs : [Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. ]

pls help me to resolve it , thank u!!!

------------------------------------

in rsreportserver.config:

------------------------------------

in rssrvpolicy.config:



Hello Frank,

Thanks for using our products.

As far as I can see that an error is occurring when you are trying to convert the .RDL file into PDF format and Aspose.Pdf for Reporting Services is trying to generate Aspose.Pdf.Exception.pdf over C:/ drive but your current user do not have access privileges to save the file over C:/ drive.

Can you please share the source .RDL file so that we can test the scenario at our end. Please make sure that the report does not include any references to external datasources or generate a similar one based over AdventureWorks database.

We apologize for your inconvenience.

I set the access privileges for C:/ drive with 'full control', but it's not work, FileIOPermission error still occurs.

May be the chosen users are not the correct ones which I should set access privileges, could you give a suggestion?

Hi,

Thanks for the information.

Well I think you may try giving full access rights to EveryOne group. In case you still face the problem, please share the source .RDL file.

We apologize for your inconvenience.

I got the same error.

Enclosed my demo project source and exception information for your investigation.

Hi,

Thanks for sharing the resource documents.

We are looking into the details of this problem and will get back to you soon. Sorry for the delay and inconvenience.

Hi,

Any updates? Without resolving this issue, we are not able to finish our evaluation. Anyway, please keep us updated. Thank you!

I bet my problem is same as this one:

http://www.aspose.com/community/forums/152100/that-assembly-does-not-allow-partially-trusted-callers.error-when-exporting-pdf-in-reports-server/showthread.aspx

Hi,

Thanks for the information. We are working over this query and trying to figure out the actual reasons of this problem. Please spare us little time and we will get back to you soon. We apologize for the delay and inconvenience.

the following log be recorded in '...\Reporting Services\LogFiles' when error occurs
hope this can help you to fix it

-------------------------------------------------
aspnet_wp!library!7!08/25/2010-14:06:01:: i INFO: Call to RenderNext( '/Reports/TestReport' )
aspnet_wp!processing!7!08/25/2010-14:06:01:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_SystemDirectory()
at Aspose.Pdf.ReportingServices.Renderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The first permission that failed was:
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
PathDiscovery="C:\WINDOWS\system32"/>

The demand was for:
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
PathDiscovery="C:\WINDOWS\system32"/>

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="Execution"/>
<IPermission class="System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Url="file:///c:/Program Files/Microsoft SQL Server/MSSQL.3/Reporting Services/ReportServer/bin/Aspose.Pdf.ReportingServices.DLL"/>
<IPermission class="System.Security.Permissions.ZoneIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Zone="MyComputer"/>

The assembly or AppDomain that failed was:
Aspose.Pdf.ReportingServices, Version=1.7.1.0, Culture=neutral, PublicKeyToken=null
The method that caused the failure was:
Boolean Render(Microsoft.ReportingServices.ReportRendering.Report, System.Collections.Specialized.NameValueCollection, System.Collections.Specialized.NameValueCollection, System.Collections.Specialized.NameValueCollection, Microsoft.ReportingServices.ReportRendering.EvaluateHeaderFooterExpressions, Microsoft.ReportingServices.Interfaces.CreateAndRegisterStream)
The Zone of the assembly that failed was:
MyComputer
The Url of the assembly that failed was:
file:///c:/Program Files/Microsoft SQL Server/MSSQL.3/Reporting Services/ReportServer/bin/Aspose.Pdf.ReportingServices.DLL
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
--- End of inner exception stack trace ---
aspnet_wp!webserver!7!08/25/2010-14:06:01:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An unexpected error occurred in Report Processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Environment.get_SystemDirectory()
at Aspose.Pdf.ReportingServices.Renderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The first permission that failed was:
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
PathDiscovery="C:\WINDOWS\system32"/>

The demand was for:
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
PathDiscovery="C:\WINDOWS\system32"/>

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="Execution"/>
<IPermission class="System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Url="file:///c:/Program Files/Microsoft SQL Server/MSSQL.3/Reporting Services/ReportServer/bin/Aspose.Pdf.ReportingServices.DLL"/>
<IPermission class="System.Security.Permissions.ZoneIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Zone="MyComputer"/>

The assembly or AppDomain that failed was:
Aspose.Pdf.ReportingServices, Version=1.7.1.0, Culture=neutral, PublicKeyToken=null
The method that caused the failure was:
Boolean Render(Microsoft.ReportingServices.ReportRendering.Report, System.Collections.Specialized.NameValueCollection, System.Collections.Specialized.NameValueCollection, System.Collections.Specialized.NameValueCollection, Microsoft.ReportingServices.ReportRendering.EvaluateHeaderFooterExpressions, Microsoft.ReportingServices.Interfaces.CreateAndRegisterStream)
The Zone of the assembly that failed was:
MyComputer
The Url of the assembly that failed was:
file:///c:/Program Files/Microsoft SQL Server/MSSQL.3/Reporting Services/ReportServer/bin/Aspose.Pdf.ReportingServices.DLL
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(IRenderingExtension renderer, CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshot(CreateReportChunk createChunkCallback, RenderingContext rc, GetResource getResourceCallback)
at Microsoft.ReportingServices.Library.RenderSnapshotAction.Render()
at Microsoft.ReportingServices.Library.RSService.RenderFromSessionNoCache(CatalogItemContext reportContext, ClientRequest session, RenderingResult& result)
at Microsoft.ReportingServices.Library.RSService.RenderFromSession(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
at Microsoft.ReportingServices.Library.RSService.RenderNext(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effecectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.RenderNextCancelableStep.Execute()
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
at Microsoft.ReportingServices.Library.RenderNextCancelableStep.RenderNext(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobType type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport(HttpResponseStreamFactory streamFactory)
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.DoStreamedOperation(StreamedOperation operation)
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType)
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()

We made it run under report designer IDE mode. The format is really unacceptable compares to what Aspose Word for Reporting Service did. So we decided to give up the evaluation. However, thank you for your replies.

Best Regards

Hi,

Sorry for replying you late.

I have tested the scenario with latest version of Aspose.Pdf for Reporting Services 1.8.0 and as per my observations, the report output seems to be correct. In order to generate a correct output, I have set the page orientation to LandScape and have set the page right margin as 5. Please take a look over the attached resultant PDF that I have generated. You may also find the updated .RDL with configuration parameters information.

Can you please try using the latest release version available for download at this link and in case you still face any problem, please feel free to contact. We apologize for your inconvenience.

Please visit the following links for information on how to Configure Aspose.Pdf for Reporting Services.

Also please visit Page Orientation ,PageSize and Page margin size

Hi,

Thanks for your patience and sorry for the delay.

We have made some progress towards the resolution of the problem that you have reported earlier and soon you will be provided with the hotfix containing the resolution of this problem. Please be patient and spare us little time. We are really sorry for the delay and inconvenience.

The issues you have found earlier (filed as 21586) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.