SSRS Web服务URL提供错误(500)

时间:2019-02-10 15:00:41

标签: reporting-services ssrs-2017

当我尝试访问SSRS Web服务URL(例如char * InsertName(char * string, char * name) { char temp; for(int i = 0; i < strlen(string); i++) { if(string[i] == '$') { for(int k = i, j = 0; j < strlen(name); j++, k++) { temp = string[k+2]; string[k] = name[j]; string[k+1] = temp; } return string; } } return ""; } )时,它为我提供了错误500。但是,Web Portal URL(http://SERVERNAME:1234/ReportServer/)可以正常工作。它甚至为我提供了SQL Server Reporting Services的UI。

到目前为止,我已经尝试过重新安装SSRS,更改端口,帐户和数据库,所有这些都没有任何运气(Reporting Services服务正在运行)。我真的没有主意,Microsoft针对此特定问题的文档非常糟糕,因为它建议您尝试修改NETWORK SERVICE帐户权限,这可以在添加Windows功能之一之后完成(我可以添加,只能在以下功能上完成) Windows 10企业版)。

有人遇到这个问题或设法找到解决方法吗?

2 个答案:

答案 0 :(得分:0)

SSRS的实例具有两个非常独立的Web应用程序。通常他们有这样的URL:

  1. http://ServerName/Reports
  2. http://ServerName/ReportServer

在您的情况下,似乎第一个配置正确并且可以正常工作,而第二个失败。 失败原因可以在存储在SSRS实例文件夹中的日志文件中找到,例如:

  

D:\ SQLData \ MSRS13.MSSQLSERVER \ Reporting Services \ LogFiles

此路径可以不同,具体取决于在初始安装期间选择的实例目录。可以通过打开任务管理器并找到 ReportingServicesService.exe 的文件位置来找到它:

enter image description here

然后,在LogFiles目录中打开最新的日志文件,并检查类别为ERROR的消息,例如:

ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'RequestTypeList'. ---> System.Data.SqlClient.SqlException: Invalid object name 'dbo.FactHistoricTrend'.
Could not use view or function 'dbo.FactFlatSSRS_Trend' because of binding errors.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at Microsoft.ReportingServices.DataExtensions.SqlCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeLiveQueryExecutor.ExecuteReader(IJobContext jobContext, DataSourceErrorInspector errorInspector, String commandText)
   --- End of inner exception stack trace ---;

通过这种方式,您将知道ReportServer Web服务出现错误500的原因

答案 1 :(得分:0)

虽然我将Alexander的帖子标记为答案,因为它是如何调试问题的很好指示,但我将发布实际问题是权限-我必须为NETWORK SERVICE帐户提供SSRS根目录的rwx权限文件夹(在我的情况下是E:\Program Files\Microsoft SQL Server Reporting Services;属性->安全->编辑...)。