我在网络托管服务上的asp.net页面上使用ReportViewer。
当我在本地计算机和Visual Studio中测试报表时,所有导出都可以正常工作。将Web应用程序FTP到远程Web主机后,报告仍然有效,但只有Excel和Word导出正确。导出为PDF或Word会生成错误
System.DllNotFoundException:无法加载DLL“T2Embed”:访问被拒绝
[DllNotFoundException: Unable to load DLL 'T2Embed': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
Microsoft.ReportingServices.Rendering.ImageRenderer.FontPackage.TTGetEmbeddingType(Win32DCSafeHandle hdc, UInt32& status) +0
Microsoft.ReportingServices.Rendering.ImageRenderer.FontPackage.CheckEmbeddingRights(Win32DCSafeHandle hdc) +21
Microsoft.ReportingServices.Rendering.ImageRenderer.PDFWriter.ProcessFontForFontEmbedding(PDFFont pdfFont, Dictionary`2 embeddedFonts) +462
Microsoft.ReportingServices.Rendering.ImageRenderer.PDFWriter.EndReport() +208
Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(Report report, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream) +757
Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream) +61
[LocalProcessingException: An error occurred during local report processing.]
Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +167
Microsoft.Reporting.WebForms.LocalModeSession.RenderReport(String format, Boolean allowInternalRenderers, String deviceInfo, NameValueCollection additionalParams, Boolean cacheSecondaryStreamsForHtml, String& mimeType, String& fileNameExtension) +193
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +154
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +240
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
任何线索?
答案 0 :(得分:3)
我有完全相同的问题。我在报告页脚中使用ascii char(菱形)作为子弹。我把它删除了,每件事情都很好......
我认为在pdf导出期间因为这些ascii字符,reportviewer组件试图将字体嵌入到pdf文件中...所以它需要t2embed.dll文件。在共享主机环境中,必须授予权限才能使用它。我甚至试图将t2embed.dll上传到bin文件夹,它也没有工作,并且产生32位64位问题..需要访问IIS才能启用设置。
可能是一个老问题。希望它能帮助一些人:)
答案 1 :(得分:0)
您是否也发送了T2Embed.dll
?
尝试将“{1}}的权限修改为”READ“为”Everyone“。