winform程序,使用了rdlc报表服务,通过vs自带的发布功能发布之后(发布到本机),然后进行安装打开之后运行报表报错:
[2022-03-25T14:13:39] ->
SPType:Report
Message:An error occurred during local report processing.
StackTrace: 在 Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
在 Microsoft.Reporting.WinForms.LocalReport.GetParameters()
在 Microsoft.Reporting.WinForms.RSParams.CreateParameterPrompts(ReportParameterInfoCollection parameterInfos)
在 Microsoft.Reporting.WinForms.RSParams.EnsureParamsLoaded(Boolean forceCredentialsShown, ReportParameterInfoCollection parameterInfos)
在 Microsoft.Reporting.WinForms.ReportViewer.RenderReportWithNewParameters(Int32 pageNumber, PostRenderArgs postRenderArgs)
[2022-03-25T14:13:39] ->
SPType:Report
Message:The definition of the report '' is invalid.
StackTrace: 在 Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot)
在 Microsoft.Reporting.LocalService.GetCompiledReport(PreviewItemContext itemContext, Boolean rebuild, ControlSnapshot& snapshot)
在 Microsoft.Reporting.LocalService.CompileReport()
在 Microsoft.Reporting.WinForms.LocalReport.EnsureExecutionSession()
[2022-03-25T14:13:39] ->
SPType:Report
Message:拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))
StackTrace: 在 System.Deployment.Internal.Isolation.IsolationInterop.CreateActContext(CreateActContextParameters& Params)
在 System.Deployment.Internal.Isolation.IsolationInterop.CreateActContext(IDefinitionAppId AppId)
在 System.ActivationContext.CreateFromName(ApplicationIdentity applicationIdentity)
在 System.Deployment.Internal.Isolation.Manifest.CmsUtils.CreateActivationContext(String fullName, String[] manifestPaths, Boolean useFusionActivationContext, ApplicationIdentity& applicationIdentity, ActivationContext& activationContext)
在 System.AppDomain.InitializeDomainSecurity(Evidence providedSecurityInfo, Evidence creatorsSecurityInfo, Boolean generateDefaultEvidence, IntPtr parentSecurityDescriptor, Boolean publishAppDomain)
在 System.AppDomain.Setup(Object arg)
在 System.AppDomain.nCreateDomain(String friendlyName, AppDomainSetup setup, Evidence providedSecurityInfo, Evidence creatorsSecurityInfo, IntPtr parentSecurityDescriptor)
在 System.AppDomain.InternalCreateDomain(String friendlyName, Evidence securityInfo, AppDomainSetup info)
在 System.AppDomain.CreateDomain(String friendlyName, Evidence securityInfo, AppDomainSetup info)
在 Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot)
另外点击发布之后目录Application Files
中的exe 文件运行却不会报错
没权限吧, 设置everyone
设置了,也是同样的报错
@RoseNix:
拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))
这句话你百度一下相关的讲解办法吧,这里就是权限问题,或者防火墙问题,一般设置了everyone 就没什么问题了
你看下安装的电脑文件夹下有没有rdlc文件